public class StateSaverQueue
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
StateSaverQueue(IntegerCallback saveFinishedCallback,
LoggerIfc logger,
java.lang.Object stateLock,
TimedStateMerger stateMerger,
StateFreezer stateFreezer,
AsynchronousStateSaver stateSaver)
Constructs a StateSaverThread.
|
Modifier and Type | Method and Description |
---|---|
void |
addStateRequest(Callback requestor)
Adds a save state request to the queue.
|
void |
run()
Run method for the state saving Thread.
|
void |
shutdown()
Stops the state saving Thread.
|
public StateSaverQueue(IntegerCallback saveFinishedCallback, LoggerIfc logger, java.lang.Object stateLock, TimedStateMerger stateMerger, StateFreezer stateFreezer, AsynchronousStateSaver stateSaver)
saveFinishedCallback
- Callback to an Object when all
save state processing has
finished, and normal processing
has resumed. The number of
processed requests is
returned to the callback.logger
- Logger for errors and warnings.stateLock
- Insures no 2 save state routines
occur at the same time.stateMerger
- Used to notify that a new
state has been created, and
merging should be done.stateFreezer
- Used to freeze the processing
in the system.stateSaver
- Used for the actual save state
routines.public void shutdown()
public void addStateRequest(Callback requestor)
requestor
- Callback to the Object that initiated
the save state request. This callback
is made when the state has been
save successfully, but before
the system has resumed processing.public void run()
run
in interface java.lang.Runnable