Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
public interface FileWriterMultiFileWriter { 
  /**
   * append events to file
   */
  void append(Iterator<LogEvent> events);
 
  /**
   * create a file corresponding to the entityId and timestamp and return the file
   **/
  File createFile(EntityId entityId, longLogEvent timestampevent);
 
  /**
   * close the file
   **/
  void close(File file, long timestamp);

  /**
   * flush the contents
   **/
  void flush(File file);
}
Code Block
public interface RotationPolicy {
  /**
   * For the logEvent, decide if we should rotate the logcurrent file corresponding to this event or not.
   */
  boolean shouldRotateFile(LogEvent logEvent);
 
  /**
   * For the logEvent, rotate the log file based on rotation logic and return the newly created File.
   */
  File rotateFile(File file, LogEvent logEvent);
 
  /**
   * For the logEvent, get the currently active file used for appending the log events.
   */ 		
  File getActiveFile(LogEvent logEvent);
}

 

Approach

...