Class GraphTransactionUtil

java.lang.Object
org.eclipse.jnosql.databases.tinkerpop.communication.GraphTransactionUtil

public final class GraphTransactionUtil extends Object
Utility class providing methods to manage transactions in a graph database. This class offers functionality to lock and unlock transactions, as well as automatic transaction management.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks if automatic transaction management is enabled.
    static void
    lock(org.apache.tinkerpop.gremlin.structure.Transaction transaction)
    Locks the current transaction, preventing it from being committed.
    static void
    transaction(org.apache.tinkerpop.gremlin.structure.Graph graph)
    Automatically commits a transaction if enabled and not locked.
    static void
    Unlocks the current transaction.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • lock

      public static void lock(org.apache.tinkerpop.gremlin.structure.Transaction transaction)
      Locks the current transaction, preventing it from being committed.
      Parameters:
      transaction - the transaction to lock
    • unlock

      public static void unlock()
      Unlocks the current transaction. Allows the transaction to be committed.
    • transaction

      public static void transaction(org.apache.tinkerpop.gremlin.structure.Graph graph)
      Automatically commits a transaction if enabled and not locked.
      Parameters:
      graph - the graph instance
    • isAutomatic

      public static boolean isAutomatic()
      Checks if automatic transaction management is enabled.
      Returns:
      true if automatic transaction management is enabled, false otherwise