Class OutputManagedFile

java.lang.Object
org.apache.jena.rdfpatch.filelog.rotate.OutputManagedFile
All Implemented Interfaces:
ManagedOutput

public class OutputManagedFile extends Object implements ManagedOutput
File-based ManagedOutput with various FilePolicy for file rotation.
  • Constructor Details

    • OutputManagedFile

      public OutputManagedFile(Path directory, String baseFilename, FilePolicy strategy)
  • Method Details

    • roller

      public Roller roller()
      Get rotation engine
      Specified by:
      roller in interface ManagedOutput
    • currentOutput

      public OutputStream currentOutput()
      Description copied from interface: ManagedOutput
      Current output stream, or null if there hasn't been one yet
      Specified by:
      currentOutput in interface ManagedOutput
    • currentFilename

      public Path currentFilename()
      Description copied from interface: ManagedOutput
      The most recent output file name, only valid during an output section, else null.
      Specified by:
      currentFilename in interface ManagedOutput
    • latestFilename

      public Path latestFilename()
      Description copied from interface: ManagedOutput
      The latest output file name, or null if there hasn't been one yet
      Specified by:
      latestFilename in interface ManagedOutput
    • output

      public OutputStream output()
      Description copied from interface: ManagedOutput
      Get an OutputStream; use with try-resources or similar usage pattern. Closing the OutputStream returns it to the manager.
      Specified by:
      output in interface ManagedOutput
    • rotate

      public void rotate()
      Force a rotation of the output file.
      Specified by:
      rotate in interface ManagedOutput