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 TypeMethodDescriptionDirectory under management.files()Stream of all files, sorted into reverse order, newest to oldest.voidFinished an output section.booleanPolicy 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.voidrotate()Move files on (if appropriate)voidStarting 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 of all files, sorted into reverse order, newest to oldest.
-