Class FileHistory


public class FileHistory extends InMemoryHistory
Read the history file at init and writeToStdOut to it at shutdown
Author:
Ståle W. Pedersen
  • Constructor Details

    • FileHistory

      public FileHistory(File file, int maxSize)
      Creates a FileHistory with the specified file and maximum size.
      Parameters:
      file - the history file
      maxSize - the maximum number of history entries
    • FileHistory

      public FileHistory(File file, int maxSize, boolean logging)
      Creates a FileHistory with the specified file, maximum size, and logging option.
      Parameters:
      file - the history file
      maxSize - the maximum number of history entries
      logging - whether to log warnings and errors
    • FileHistory

      public FileHistory(File file, int maxSize, FileAccessPermission historyFilePermission, boolean logging)
      Creates a FileHistory with full configuration options.
      Parameters:
      file - the history file
      maxSize - the maximum number of history entries
      historyFilePermission - the file access permissions to set on the history file
      logging - whether to log warnings and errors
  • Method Details

    • stop

      public void stop()
      Description copied from class: History
      Stops the history and performs any necessary cleanup (e.g., saving to file).
      Overrides:
      stop in class InMemoryHistory