@FunctionalInterface public static interface FileWritingMessageHandler.MessageFlushPredicate
FileExistsMode.APPEND_NO_FLUSH
an implementation of this interface is called for each file that has pending data
to flush when a trigger message is received.FileWritingMessageHandler.trigger(Message)| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldFlush(String fileAbsolutePath,
long firstWrite,
long lastWrite,
Message<?> filterMessage)
Return true to cause the file to be flushed and closed.
|
boolean shouldFlush(String fileAbsolutePath, long firstWrite, long lastWrite, Message<?> filterMessage)
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().filterMessage - an optional message to be used in the decision process.