Class LogCompressor

java.lang.Object
org.jpos.util.LogCompressor

public class LogCompressor extends Object
Serializes log file compression across all log listener instances through a single on-demand background worker.

The worker thread is created on demand, runs as a low-priority daemon, and exits after IDLE_TIMEOUT milliseconds of inactivity.

  • Method Details

    • getInstance

      public static LogCompressor getInstance()
      Returns the lazy-initialised singleton.
      Returns:
      the shared LogCompressor
    • submit

      public void submit(File logFile, Runnable task)
      Submits a compression task for logFile on the shared executor.
      Parameters:
      logFile - log file being compressed (used for diagnostic logging)
      task - compression task to run