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.
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 TypeMethodDescriptionboolean
shouldFlush
(String fileAbsolutePath, long firstWrite, long lastWrite) Return true to cause the file to be flushed and closed.
-
Method Details
-
shouldFlush
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.
-