Package org.imixs.archive.service
Class SyncService
java.lang.Object
org.imixs.archive.service.SyncService
The SyncService pulls a Snapshot into an Apache Cassandra archive. The
service uses an asynchronous mechanism based on the Imixs EventLog.
The service connects to an Imixs-Workflow instance by the Rest Client to read new snapshot data.
The service is triggered by the SyncScheduler implementing a ManagedScheduledExecutorService.
- Version:
- 2.0
- Author:
- ralph.soika@imixs.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessEventLog(org.imixs.melman.EventLogClient eventLogClient, org.imixs.melman.DocumentClient documentClient) This method is called by the ManagedScheduledExecutorService.org.imixs.workflow.ItemCollectionpullSnapshot(org.imixs.workflow.ItemCollection eventLogEntry, org.imixs.melman.DocumentClient documentClient, org.imixs.melman.EventLogClient eventLogClient) This method lookups the event log entries and pushes new snapshots into the archive service.voidreleaseDeadLocks(org.imixs.melman.EventLogClient eventLogClient) Asynchronous method to release dead locks
-
Field Details
-
EVENTLOG_TOPIC_ADD
- See Also:
-
EVENTLOG_TOPIC_REMOVE
- See Also:
-
EVENTLOG_TOPIC_BACKUP
- See Also:
-
ITEM_BACKUPRESTORE
- See Also:
-
ENV_WORKFLOW_SERVICE_ENDPOINT
- See Also:
-
ENV_WORKFLOW_SERVICE_USER
- See Also:
-
ENV_WORKFLOW_SERVICE_PASSWORD
- See Also:
-
ENV_WORKFLOW_SERVICE_AUTHMETHOD
- See Also:
-
ENV_WORKFLOW_SYNC_INTERVAL
- See Also:
-
ENV_WORKFLOW_SYNC_INITIALDELAY
- See Also:
-
ENV_WORKFLOW_SYNC_DEADLOCK
- See Also:
-
ENV_BACKUP_SERVICE_ENDPOINT
- See Also:
-
ENV_BACKUP_MIRRORS
- See Also:
-
-
Constructor Details
-
SyncService
public SyncService()
-
-
Method Details
-
processEventLog
public void processEventLog(org.imixs.melman.EventLogClient eventLogClient, org.imixs.melman.DocumentClient documentClient) throws org.imixs.melman.RestAPIException This method is called by the ManagedScheduledExecutorService. The method lookups the event log entries and pushes new snapshots into the archive service.Each eventLogEntry is locked to guaranty exclusive processing.
- Throws:
org.imixs.melman.RestAPIException
-
releaseDeadLocks
public void releaseDeadLocks(org.imixs.melman.EventLogClient eventLogClient) throws org.imixs.melman.RestAPIException Asynchronous method to release dead locks- Parameters:
eventLogClient-deadLockInterval-topic-- Throws:
org.imixs.melman.RestAPIException
-
pullSnapshot
public org.imixs.workflow.ItemCollection pullSnapshot(org.imixs.workflow.ItemCollection eventLogEntry, org.imixs.melman.DocumentClient documentClient, org.imixs.melman.EventLogClient eventLogClient) throws ArchiveException This method lookups the event log entries and pushes new snapshots into the archive service.The method returns a AsyncResult to indicate the completion of the push. A client can use this information for further control.
The method returns the snapshot ItemCollection
- Throws:
ArchiveExceptionorg.imixs.melman.RestAPIException
-