Class RestoreScheduler
The scheduler configuration is stored in the Metadata object of the cassandra keyspace. The following attributes are defining the restore procedure:
restore.from: the earliest snapshot syncpoint to be restored (can be 0)
restore.to: the latest snapshot syncpoint to be restored
restore.point: the current snapshot syncpoint. This date is used to select snapshots by date in a cassandra partion.
restore.count: count of restored snapshots
restore.size: bytes of restored snapshot data
The timer is stopped after all snapshots in the restore time range (restore.from - restore.to) are restored.
- Version:
- 1.0
- Author:
- rsoika
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Stops the current restore processjakarta.ejb.TimerThis method returns a timer for a corresponding id if such a timer object exists.List<org.imixs.workflow.ItemCollection>getOptions(org.imixs.workflow.ItemCollection metaData) returns the optional embedded Map List of the options, stored in the metadata object.voidsetOptions(List<org.imixs.workflow.ItemCollection> options, org.imixs.workflow.ItemCollection metaData) Convert a List of ItemCollections back into a List of Map elementsvoidStarts a new restore process with a EJB TimerService
-
Field Details
-
TIMER_ID_RESTORESERVICE
- See Also:
-
TIMER_INTERVAL_DURATION
public static final long TIMER_INTERVAL_DURATION- See Also:
-
ITEM_RESTORE_FROM
- See Also:
-
ITEM_RESTORE_TO
- See Also:
-
ITEM_RESTORE_SYNCPOINT
- See Also:
-
ITEM_RESTORE_SYNCCOUNT
- See Also:
-
ITEM_RESTORE_SYNCERRORS
- See Also:
-
ITEM_RESTORE_SYNCSIZE
- See Also:
-
ITEM_RESTORE_OPTIONS
- See Also:
-
MESSAGE_TOPIC
- See Also:
-
-
Constructor Details
-
RestoreScheduler
public RestoreScheduler()
-
-
Method Details
-
start
Starts a new restore process with a EJB TimerServiceThe Timer will be started imediatly with a intervall duration defined by the constante TIMER_INTERVAL_DURATION
The meta data for the restore process is stored in the metadata object.
The restore process selects snapshot data by date (SNAPSHOTS_BY_MODIFIED). The current date is stored in the meta data. The meta data is updated after each iteration.
- Parameters:
datFrom- - syncpoint fromdatTo- - syncpoint tooptions- - optional list of item map.- Throws:
ArchiveException
-
cancel
Stops the current restore process- Throws:
ArchiveException
-
findTimer
public jakarta.ejb.Timer findTimer()This method returns a timer for a corresponding id if such a timer object exists.- Parameters:
id-- Returns:
- Timer
- Throws:
Exception
-
getOptions
public List<org.imixs.workflow.ItemCollection> getOptions(org.imixs.workflow.ItemCollection metaData) returns the optional embedded Map List of the options, stored in the metadata object. -
setOptions
public void setOptions(List<org.imixs.workflow.ItemCollection> options, org.imixs.workflow.ItemCollection metaData) Convert a List of ItemCollections back into a List of Map elements- Parameters:
options- - list of optionsmetaData- - metaData object
-