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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processEventLog(org.imixs.melman.EventLogClient eventLogClient, org.imixs.melman.DocumentClient documentClient)
    This method is called by the ManagedScheduledExecutorService.
    org.imixs.workflow.ItemCollection
    pullSnapshot(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.
    void
    releaseDeadLocks(org.imixs.melman.EventLogClient eventLogClient)
    Asynchronous method to release dead locks

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      ArchiveException
      org.imixs.melman.RestAPIException