Enum Class IndexOptions.WriteConflictStrategy

java.lang.Object
java.lang.Enum<IndexOptions.WriteConflictStrategy>
com.complexible.stardog.index.IndexOptions.WriteConflictStrategy
All Implemented Interfaces:
Serializable, Comparable<IndexOptions.WriteConflictStrategy>, Constable
Enclosing class:
IndexOptions

public static enum IndexOptions.WriteConflictStrategy extends Enum<IndexOptions.WriteConflictStrategy>
How a database resolves two transactions writing the same statement. Both strategies work per statement, so concurrent transactions only interact where they write the same quad.
  • Enum Constant Details

    • LAST_COMMIT_WINS

      public static final IndexOptions.WriteConflictStrategy LAST_COMMIT_WINS
      Default. No conflict checking: concurrent writers all commit and, per statement, the last one to commit wins. Use ABORT_ON_CONFLICT or TransactionIsolation.SERIALIZABLE where concurrent DELETE/INSERT must produce a deterministic result.
    • ABORT_ON_CONFLICT

      public static final IndexOptions.WriteConflictStrategy ABORT_ON_CONFLICT
      Abort the losing transaction with Operation aborted: Write Conflict detected (QEWCE2). Writing a statement conflicts if another transaction wrote it and is either still active or committed after this transaction began; a rolled back transaction never conflicts.

      Significantly slower than LAST_COMMIT_WINS. In a cluster each node checks independently, so a conflict on any one node aborts the transaction cluster-wide.

  • Method Details

    • values

      public static IndexOptions.WriteConflictStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IndexOptions.WriteConflictStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forcesWriteConflictChecking

      public boolean forcesWriteConflictChecking()