public class KeepLastNCleanupPolicy extends Object implements RollingFileMessageWriter.CleanupPolicy
N + 1
files or the writer
at any time.Constructor and Description |
---|
KeepLastNCleanupPolicy(int keepLastN,
Pattern filePattern) |
KeepLastNCleanupPolicy(int keepLastN,
String filePattern) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getFilesToDelete(List<String> candidateFiles,
String currentFileName)
Get a list of files that needs to be deleted because of the cleanup policy.
|
public KeepLastNCleanupPolicy(int keepLastN, String filePattern)
public KeepLastNCleanupPolicy(int keepLastN, Pattern filePattern)
@Nonnull public List<String> getFilesToDelete(@Nonnull List<String> candidateFiles, @Nonnull String currentFileName)
RollingFileMessageWriter.CleanupPolicy
getFilesToDelete
in interface RollingFileMessageWriter.CleanupPolicy
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.Copyright © 2015–2018 morimekta.net. All rights reserved.