public class RestoreService extends Object
The scheduler configuration is stored in the Metadata object of the cassandra keyspace. The following attributes are defining the restore procedure:
restore.from: the eariest 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 stoped after all snapshots in the restore timerange (restore.from - restore.to) are restored.
| Modifier and Type | Field and Description |
|---|---|
static String |
ITEM_RESTORE_FROM |
static String |
ITEM_RESTORE_OPTIONS |
static String |
ITEM_RESTORE_SYNCCOUNT |
static String |
ITEM_RESTORE_SYNCERRORS |
static String |
ITEM_RESTORE_SYNCPOINT |
static String |
ITEM_RESTORE_SYNCSIZE |
static String |
ITEM_RESTORE_TO |
static String |
MESSAGE_TOPIC |
static String |
TIMER_ID_RESTORESERVICE |
static long |
TIMER_INTERVAL_DURATION |
| Constructor and Description |
|---|
RestoreService() |
| Modifier and Type | Method and Description |
|---|---|
javax.ejb.Timer |
findTimer()
This 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.
|
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
|
void |
start(long restoreFrom,
long restoreTo,
List<Map> options)
Starts a new restore process with a EJB TimerService
The 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.
|
public static final String TIMER_ID_RESTORESERVICE
public static final long TIMER_INTERVAL_DURATION
public static final String ITEM_RESTORE_FROM
public static final String ITEM_RESTORE_TO
public static final String ITEM_RESTORE_SYNCPOINT
public static final String ITEM_RESTORE_SYNCCOUNT
public static final String ITEM_RESTORE_SYNCERRORS
public static final String ITEM_RESTORE_SYNCSIZE
public static final String ITEM_RESTORE_OPTIONS
public static final String MESSAGE_TOPIC
public void start(long restoreFrom,
long restoreTo,
List<Map> options)
throws ArchiveException
The 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.
datFrom - - syncpoint fromdatTo - - syncpoint tooptions - - optional list of item map.ArchiveExceptionpublic javax.ejb.Timer findTimer()
id - Exceptionpublic List<org.imixs.workflow.ItemCollection> getOptions(org.imixs.workflow.ItemCollection metaData)
public void setOptions(List<org.imixs.workflow.ItemCollection> options, org.imixs.workflow.ItemCollection metaData)
options - - list of optionsmetaData - - metaData objectCopyright © 2016–2019 Imixs Software Solutions GmbH. All rights reserved.