Interface RollingFileMessageWriter.CleanupPolicy

  • All Known Implementing Classes:
    KeepLastNCleanupPolicy, TimeBasedCleanupPolicy
    Enclosing class:
    RollingFileMessageWriter
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface RollingFileMessageWriter.CleanupPolicy
    Interface for cleanup policy implementations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getFilesToDelete​(java.util.List<java.lang.String> candidateFiles, java.lang.String currentFileName)
      Get a list of files that needs to be deleted because of the cleanup policy.
    • Method Detail

      • getFilesToDelete

        @Nonnull
        java.util.List<java.lang.String> getFilesToDelete​(@Nonnull
                                                          java.util.List<java.lang.String> candidateFiles,
                                                          @Nonnull
                                                          java.lang.String currentFileName)
        Get a list of files that needs to be deleted because of the cleanup policy.
        Parameters:
        candidateFiles - List of the files that can be cleaned up. This does NOT include the currently written files (current file and symlink).
        currentFileName - The current file name.
        Returns:
        List of files that needs to be deleted.