Interface TransactionLog


public interface TransactionLog
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    complete(String transactionId)
    Cleans up any transaction log entries as complete method means transaction was completed successfully so any log entries can be safely dropped
    void
    complete(String transactionId, String id, String instanceId)
     
    boolean
    contains(String id, String instanceId)
     
    byte[]
    readContent(String processId, String instanceId)
    Returns content of the process instance with given identifier that belongs to process definition identified by processId
    void
    record(String transactionId, String processId, String instanceId, NodeInstance currentNodeInstance)
    Records transaction operation that should be stored in transaction log before it gets flushed into the storage
    recoverable(String processId)
    Returns set of identifiers of process instances that were not successfully processed and requires recovery
    boolean
    Determines if there are any transactions left that require recovery
  • Method Details

    • requiresRecovery

      boolean requiresRecovery()
      Determines if there are any transactions left that require recovery
      Returns:
      true when there are unfinished transactions otherwise false
    • readContent

      byte[] readContent(String processId, String instanceId)
      Returns content of the process instance with given identifier that belongs to process definition identified by processId
      Parameters:
      processId - id of the process definition
      instanceId - id of the process instance
      Returns:
      returns read bytes representing the process instance
    • recoverable

      Set<String> recoverable(String processId)
      Returns set of identifiers of process instances that were not successfully processed and requires recovery
      Parameters:
      processId - identifier of the process that the recoverable instances should be located
      Returns:
      set of instance ids that are to be recovered
    • record

      void record(String transactionId, String processId, String instanceId, NodeInstance currentNodeInstance)
      Records transaction operation that should be stored in transaction log before it gets flushed into the storage
      Parameters:
      transactionId - - unique identifier of the transaction
      processId - id of the process definition
      instanceId - - id of the instance the transaction belong to
      currentNodeInstance - - node instance that is being triggered
    • complete

      void complete(String transactionId)
      Cleans up any transaction log entries as complete method means transaction was completed successfully so any log entries can be safely dropped
      Parameters:
      transactionId - - unique identifier of the transaction
    • complete

      void complete(String transactionId, String id, String instanceId)
    • contains

      boolean contains(String id, String instanceId)