Class FileAuditEndpoint.Builder

    • Field Detail

      • clock

        private Clock clock
      • location

        private Path location
      • syncOnAccept

        private boolean syncOnAccept
      • flushOnAccept

        private boolean flushOnAccept
      • flushSet

        private boolean flushSet
    • Constructor Detail

      • Builder

        Builder()
    • Method Detail

      • setLocation

        public FileAuditEndpoint.Builder setLocation​(Path location)
        Set the location to write the audit events to.
        Parameters:
        location - the location to write the audit events to.
        Returns:
        this builder.
      • setFlushOnAccept

        public FileAuditEndpoint.Builder setFlushOnAccept​(boolean flushOnAccept)
        Sets if the output should be flushed on each event accepted. If not set, flushing is done when output buffers synchronization is set.
        Parameters:
        flushOnAccept - should the output be flushed on each event accepted.
        Returns:
        this builder.
        Since:
        1.3.0
      • setSyncOnAccept

        public FileAuditEndpoint.Builder setSyncOnAccept​(boolean syncOnAccept)
        Sets if the system output buffers should be forced to be synchronized on each event accepted. Enabled by default. Output flushing can be set independently using setFlushOnAccept(boolean) but defaults to this value.
        Parameters:
        syncOnAccept - should the system output buffers be forced to be synchronized on each event accepted.
        Returns:
        this builder.
      • setClock

        FileAuditEndpoint.Builder setClock​(Clock clock)
        Sets the Clock instance the resulting FileAuditEndpoint should use to query the current time. For testing purposes only, therefore package visible.
        Parameters:
        clock - the clock to query the current time
        Returns:
        this builder