public interface Roller
Interface to a policy for rotating files. Writing to files is in "sections" - a section always goes into a single file; multiple sections may go into one file or several. Rollover only happens between sections.

startSection, finishSection bracket each use of a ManagedOutput object.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Directory under management.
    Stream of all files, sorted into reverse order, newest to oldest.
    void
    Finished an output section.
    boolean
    Policy says that the setup is no longer valid for a new (next) section.
    Latest filename, either currently being written or the last one written.
    Generate the next filename; includes any directory name to the file.
    void
    Move files on (if appropriate)
    void
    Starting an output section.
  • Method Details

    • directory

      Path directory()
      Directory under management.
    • startSection

      void startSection()
      Starting an output section.
    • finishSection

      void finishSection()
      Finished an output section.
    • latestFilename

      Path latestFilename()
      Latest filename, either currently being written or the last one written. The path includes the directory name to the file. Returns null if there isn't one (nothing written at this location).
    • hasExpired

      boolean hasExpired()
      Policy says that the setup is no longer valid for a new (next) section.
    • rotate

      void rotate()
      Move files on (if appropriate)
    • nextFilename

      Path nextFilename()
      Generate the next filename; includes any directory name to the file.
    • files

      Stream<Filename> files()
      Stream of all files, sorted into reverse order, newest to oldest.