public class KeepLastNCleanupPolicy extends Object implements RollingFileMessageWriter.CleanupPolicy
| 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.CleanupPolicygetFilesToDelete in interface RollingFileMessageWriter.CleanupPolicycandidateFiles - 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–2017 morimekta.net. All rights reserved.