@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(java.lang.String fileAbsolutePath,
long firstWrite,
long lastWrite,
org.springframework.messaging.Message<?> filterMessage)
Return true to cause the file to be flushed and closed.
|
boolean shouldFlush(java.lang.String fileAbsolutePath,
long firstWrite,
long lastWrite,
org.springframework.messaging.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.