PathCondition@Plugin(name="IfAccumulatedFileCount", category="Core", printObject=true) public final class IfAccumulatedFileCount extends Object implements PathCondition
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
accept(Path basePath,
Path relativePath,
BasicFileAttributes attrs) |
Returns
true if the specified candidate path should be deleted, false otherwise. |
void |
beforeFileTreeWalk() |
Invoked before a new file
tree walk is started.
|
static IfAccumulatedFileCount |
createFileCountCondition(int threshold,
PathCondition... nestedConditions) |
Create an IfAccumulatedFileCount condition.
|
List<PathCondition> |
getNestedConditions() |
|
int |
getThresholdCount() |
|
String |
toString() |
public int getThresholdCount()
public List<PathCondition> getNestedConditions()
public boolean accept(Path basePath, Path relativePath, BasicFileAttributes attrs)
PathConditiontrue if the specified candidate path should be deleted, false otherwise.accept in interface PathConditionbasePath - the directory from where to start scanning for deletion candidate filesrelativePath - the candidate for deletion. This path is relative to the baseDir.attrs - attributes of the candidate pathpublic void beforeFileTreeWalk()
PathConditionbeforeFileTreeWalk in interface PathCondition@PluginFactory public static IfAccumulatedFileCount createFileCountCondition(@PluginAttribute(value="exceeds",defaultInt=2147483647) int threshold, @PluginElement("PathConditions") PathCondition... nestedConditions)
threshold - The threshold count from which files will be deleted.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.