Class FileLastModifiedCleanStrategy

  • All Implemented Interfaces:
    CleanStrategy

    public class FileLastModifiedCleanStrategy
    extends java.lang.Object
    implements CleanStrategy
    Limit the file life of a max time.
    Since:
    1.5.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean shouldClean​(java.io.File file)
      Whether we should clean a specified log file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileLastModifiedCleanStrategy

        public FileLastModifiedCleanStrategy​(long maxTimeMillis)
        Constructor.
        Parameters:
        maxTimeMillis - the max time the file can keep
    • Method Detail

      • shouldClean

        public boolean shouldClean​(java.io.File file)
        Description copied from interface: CleanStrategy
        Whether we should clean a specified log file.
        Specified by:
        shouldClean in interface CleanStrategy
        Parameters:
        file - the log file
        Returns:
        true is we should clean the log file