Class TxnUtils

java.lang.Object
org.aksw.commons.txn.impl.TxnUtils

public class TxnUtils extends Object
Static methods for running commits and rollbacks on the Txn API.
  • Constructor Details

    • TxnUtils

      public TxnUtils()
  • Method Details

    • cleanupStaleTxns

      public static void cleanupStaleTxns(TxnMgr txnMgr, TxnHandler handler) throws IOException
      Throws:
      IOException
    • precommit

      public static void precommit(Txn txn, TxnHandler handler) throws Exception, IOException
      Throws:
      Exception
      IOException
    • commit

      public static void commit(Txn txn, TxnHandler handler)
    • applyJournalOld

      @Deprecated public static void applyJournalOld(Txn txn, TxnHandler handler)
      Deprecated.
      Parameters:
      txn -
      resourceAction - (resourceKey, isCommit) An action to run on a resource after changes were rolled back or committed - but before the resource is unlocked. Typically used to synchronize an in-memory cache.
    • applyJournal

      public static void applyJournal(Txn txn, TxnHandler handler)
    • finalizeCommit

      public static void finalizeCommit(Txn txn)
      Finalize all pending changes. All files of the transaction will be in their final state.
    • unlock

      public static void unlock(Txn txn, TxnHandler handler)
    • abort

      public static void abort(Txn txn, TxnHandler handler)
    • rollbackOrEnd

      public static void rollbackOrEnd(Txn txn, TxnHandler handler) throws IOException
      Throws:
      IOException