Class RollingFileManager.AsyncAction
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
-
- org.apache.logging.log4j.core.appender.rolling.RollingFileManager.AsyncAction
-
- All Implemented Interfaces:
java.lang.Runnable
,Action
- Enclosing class:
- RollingFileManager
private static class RollingFileManager.AsyncAction extends AbstractAction
Performs actions asynchronously.
-
-
Field Summary
Fields Modifier and Type Field Description private Action
action
private RollingFileManager
manager
-
Fields inherited from class org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
LOGGER
-
-
Constructor Summary
Constructors Constructor Description AsyncAction(Action act, RollingFileManager manager)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Cancels the action if not already initialized or waits till completion.boolean
execute()
Executes an action.boolean
isComplete()
Determines if action has been completed.java.lang.String
toString()
-
Methods inherited from class org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
isInterrupted, reportException, run
-
-
-
-
Field Detail
-
action
private final Action action
-
manager
private final RollingFileManager manager
-
-
Constructor Detail
-
AsyncAction
public AsyncAction(Action act, RollingFileManager manager)
Constructor.- Parameters:
act
- The action to perform.manager
- The manager.
-
-
Method Detail
-
execute
public boolean execute() throws java.io.IOException
Executes an action.- Specified by:
execute
in interfaceAction
- Specified by:
execute
in classAbstractAction
- Returns:
- true if action was successful. A return value of false will cause the rollover to be aborted if possible.
- Throws:
java.io.IOException
- if IO error, a thrown exception will cause the rollover to be aborted if possible.
-
close
public void close()
Cancels the action if not already initialized or waits till completion.- Specified by:
close
in interfaceAction
- Overrides:
close
in classAbstractAction
-
isComplete
public boolean isComplete()
Determines if action has been completed.- Specified by:
isComplete
in interfaceAction
- Overrides:
isComplete
in classAbstractAction
- Returns:
- true if action is complete.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-