Package | Description |
---|---|
org.apache.logging.log4j.core.appender.rolling.action |
Support classes for the Rolling File Appender.
|
Modifier and Type | Class and Description |
---|---|
class |
IfAccumulatedFileCount
PathCondition that accepts paths after some count threshold is exceeded during the file tree walk.
|
class |
IfAccumulatedFileSize
PathCondition that accepts paths after the accumulated file size threshold is exceeded during the file tree walk.
|
class |
IfAll
Composite
PathCondition that only accepts objects that are accepted by all component conditions. |
class |
IfAny
Composite
PathCondition that accepts objects that are accepted by any component conditions. |
class |
IfFileName
PathCondition that accepts files for deletion if their relative path matches either a glob pattern or a regular
expression.
|
class |
IfLastModified
PathCondition that accepts paths that are older than the specified duration.
|
class |
IfNot
Wrapper
PathCondition that accepts objects that are rejected by the wrapped component filter. |
Modifier and Type | Field and Description |
---|---|
private PathCondition[] |
IfAny.components |
private PathCondition[] |
IfAll.components |
private PathCondition |
IfNot.negate |
private PathCondition[] |
IfLastModified.nestedConditions |
private PathCondition[] |
IfFileName.nestedConditions |
private PathCondition[] |
IfAccumulatedFileSize.nestedConditions |
private PathCondition[] |
IfAccumulatedFileCount.nestedConditions |
private PathCondition[] |
PosixViewAttributeAction.Builder.pathConditions |
Modifier and Type | Field and Description |
---|---|
private java.util.List<? extends PathCondition> |
DeletingVisitor.pathConditions |
private java.util.List<PathCondition> |
AbstractPathAction.pathConditions |
Modifier and Type | Method and Description |
---|---|
PathCondition[] |
IfAny.getDeleteFilters() |
PathCondition[] |
IfAll.getDeleteFilters() |
PathCondition |
IfNot.getWrappedFilter() |
Modifier and Type | Method and Description |
---|---|
java.util.List<PathCondition> |
IfLastModified.getNestedConditions() |
java.util.List<PathCondition> |
IfFileName.getNestedConditions() |
java.util.List<PathCondition> |
IfAccumulatedFileSize.getNestedConditions() |
java.util.List<PathCondition> |
IfAccumulatedFileCount.getNestedConditions() |
java.util.List<PathCondition> |
AbstractPathAction.getPathConditions()
Returns the list of PathCondition objects.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
IfAll.accept(PathCondition[] list,
java.nio.file.Path baseDir,
java.nio.file.Path relativePath,
java.nio.file.attribute.BasicFileAttributes attrs)
Returns
true if all the specified conditions accept the specified path, false otherwise. |
static void |
IfAll.beforeFileTreeWalk(PathCondition[] nestedConditions)
Calls
IfAll.beforeFileTreeWalk() on all of the specified nested conditions. |
static IfLastModified |
IfLastModified.createAgeCondition(Duration age,
PathCondition... nestedConditions)
Create an IfLastModified condition.
|
static IfAll |
IfAll.createAndCondition(PathCondition... components)
Create a Composite PathCondition whose components all need to accept before this condition accepts.
|
static DeleteAction |
DeleteAction.createDeleteAction(java.lang.String basePath,
boolean followLinks,
int maxDepth,
boolean testMode,
PathSorter sorterParameter,
PathCondition[] pathConditions,
ScriptCondition scriptCondition,
Configuration config)
Create a DeleteAction.
|
static IfAccumulatedFileCount |
IfAccumulatedFileCount.createFileCountCondition(int threshold,
PathCondition... nestedConditions)
Create an IfAccumulatedFileCount condition.
|
static IfAccumulatedFileSize |
IfAccumulatedFileSize.createFileSizeCondition(java.lang.String size,
PathCondition... nestedConditions)
Create an IfAccumulatedFileSize condition.
|
static IfFileName |
IfFileName.createNameCondition(java.lang.String glob,
java.lang.String regex,
PathCondition... nestedConditions)
Creates a IfFileName condition that returns true if either the specified
glob pattern or the regular expression matches the relative path.
|
static IfNot |
IfNot.createNotCondition(PathCondition condition)
Create an IfNot PathCondition.
|
static IfAny |
IfAny.createOrCondition(PathCondition... components)
Create a Composite PathCondition: accepts if any of the nested conditions accepts.
|
PosixViewAttributeAction.Builder |
PosixViewAttributeAction.Builder.withPathConditions(PathCondition[] pathConditions)
Define path conditions to filter files in
AbstractPathAction.getBasePath() . |
Modifier and Type | Method and Description |
---|---|
protected java.nio.file.FileVisitor<java.nio.file.Path> |
PosixViewAttributeAction.createFileVisitor(java.nio.file.Path basePath,
java.util.List<PathCondition> conditions) |
protected java.nio.file.FileVisitor<java.nio.file.Path> |
DeleteAction.createFileVisitor(java.nio.file.Path visitorBaseDir,
java.util.List<PathCondition> conditions) |
protected abstract java.nio.file.FileVisitor<java.nio.file.Path> |
AbstractPathAction.createFileVisitor(java.nio.file.Path visitorBaseDir,
java.util.List<PathCondition> conditions)
Creates a new
FileVisitor<Path> to pass to the Files.walkFileTree(Path, Set, int, FileVisitor)
method when the AbstractPathAction.execute() method is invoked. |
Constructor and Description |
---|
AbstractPathAction(java.lang.String basePath,
boolean followSymbolicLinks,
int maxDepth,
PathCondition[] pathFilters,
StrSubstitutor subst)
Creates a new AbstractPathAction that starts scanning for files to process from the specified base path.
|
DeleteAction(java.lang.String basePath,
boolean followSymbolicLinks,
int maxDepth,
boolean testMode,
PathSorter sorter,
PathCondition[] pathConditions,
ScriptCondition scriptCondition,
StrSubstitutor subst)
Creates a new DeleteAction that starts scanning for files to delete from the specified base path.
|
IfAccumulatedFileCount(int thresholdParam,
PathCondition[] nestedConditions) |
IfAccumulatedFileSize(long thresholdSize,
PathCondition[] nestedConditions) |
IfAll(PathCondition... filters) |
IfAny(PathCondition... filters) |
IfFileName(java.lang.String glob,
java.lang.String regex,
PathCondition[] nestedConditions)
Constructs a FileNameFilter filter.
|
IfLastModified(Duration age,
PathCondition[] nestedConditions) |
IfNot(PathCondition negate) |
PosixViewAttributeAction(java.lang.String basePath,
boolean followSymbolicLinks,
int maxDepth,
PathCondition[] pathConditions,
StrSubstitutor subst,
java.util.Set<java.nio.file.attribute.PosixFilePermission> filePermissions,
java.lang.String fileOwner,
java.lang.String fileGroup) |
Constructor and Description |
---|
DeletingVisitor(java.nio.file.Path basePath,
java.util.List<? extends PathCondition> pathConditions,
boolean testMode)
Constructs a new DeletingVisitor.
|