Class RolloverDescriptionImpl
java.lang.Object
org.apache.logging.log4j.core.appender.rolling.RolloverDescriptionImpl
- All Implemented Interfaces:
RolloverDescription
Description of actions needed to complete rollover.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
Active log file name after rollover.private final boolean
Should active file be opened for appending.private final Action
Action to be completed after close of current active log file and before next rollover attempt, may be executed asynchronously.private final Action
Action to be completed after close of current active log file before returning control to caller. -
Constructor Summary
ConstructorsConstructorDescriptionRolloverDescriptionImpl
(String activeFileName, boolean append, Action synchronous, Action asynchronous) Create new instance. -
Method Summary
Modifier and TypeMethodDescriptionActive log file name after rollover.boolean
Specifies if active file should be opened for appending.Action to be completed after close of current active log file and before next rollover attempt, may be executed asynchronously.Action to be completed after close of current active log file before returning control to caller.
-
Field Details
-
activeFileName
Active log file name after rollover. -
append
private final boolean appendShould active file be opened for appending. -
synchronous
Action to be completed after close of current active log file before returning control to caller. -
asynchronous
Action to be completed after close of current active log file and before next rollover attempt, may be executed asynchronously.
-
-
Constructor Details
-
RolloverDescriptionImpl
public RolloverDescriptionImpl(String activeFileName, boolean append, Action synchronous, Action asynchronous) Create new instance.- Parameters:
activeFileName
- active log file name after rollover, may not be null.append
- true if active log file after rollover should be opened for appending.synchronous
- action to be completed after close of current active log file, may be null.asynchronous
- action to be completed after close of current active log file and before next rollover attempt.
-
-
Method Details
-
getActiveFileName
Active log file name after rollover.- Specified by:
getActiveFileName
in interfaceRolloverDescription
- Returns:
- active log file name after rollover.
-
getAppend
public boolean getAppend()Specifies if active file should be opened for appending.- Specified by:
getAppend
in interfaceRolloverDescription
- Returns:
- if true, active file should be opened for appending.
-
getSynchronous
Action to be completed after close of current active log file before returning control to caller.- Specified by:
getSynchronous
in interfaceRolloverDescription
- Returns:
- action, may be null.
-
getAsynchronous
Action to be completed after close of current active log file and before next rollover attempt, may be executed asynchronously.- Specified by:
getAsynchronous
in interfaceRolloverDescription
- Returns:
- action, may be null.
-