Interface FileWritingMessageHandler.FlushPredicate

Enclosing class:
FileWritingMessageHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface FileWritingMessageHandler.FlushPredicate
When using FileExistsMode.APPEND_NO_FLUSH, an implementation of this interface is called for each file that has pending data to flush and close when FileWritingMessageHandler.flushIfNeeded(FlushPredicate) is invoked.
Since:
4.3
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    shouldFlush(String fileAbsolutePath, long firstWrite, long lastWrite)
    Return true to cause the file to be flushed and closed.
  • Method Details

    • shouldFlush

      boolean shouldFlush(String fileAbsolutePath, long firstWrite, long lastWrite)
      Return true to cause the file to be flushed and closed.
      Parameters:
      fileAbsolutePath - the path to the file.
      firstWrite - the time of the first write to a new or previously closed file.
      lastWrite - the time of the last write - System.currentTimeMillis().
      Returns:
      true if the file should be flushed and closed.