Package org.imixs.archive.service
Class SyncService
- java.lang.Object
-
- org.imixs.archive.service.SyncService
-
public class SyncService extends Object
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
-
-
Constructor Summary
Constructors Constructor Description SyncService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessEventLog(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
-
-
-
Method Detail
-
processEventLog
public void processEventLog(org.imixs.melman.EventLogClient eventLogClient, org.imixs.melman.DocumentClient documentClient) throws org.imixs.melman.RestAPIExceptionThis 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.RestAPIExceptionAsynchronous 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 ArchiveExceptionThis 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
-
-