Enum Class TxnType

java.lang.Object
java.lang.Enum<TxnType>
org.apache.jena.query.TxnType
All Implemented Interfaces:
Serializable, Comparable<TxnType>, Constable

public enum TxnType extends Enum<TxnType>
  • Enum Constant Details

    • READ

      public static final TxnType READ
      Transaction mode:
      • WRITE: this guarantees a WRITE will complete if commit() is called. The same as begin(ReadWrite.WRITE).
      • READ: the transaction can not promote to WRITE,ensuring read-only access to the data. The same as begin(ReadWrite.READ).
      • READ_PROMOTE: the transaction will go from "read" to "write" if the dataset has not been modified but if it has, the promotion fails with exception.
      • READ_COMMITTED_PROMOTE: Use this with care. The promotion will succeed but changes from other transactions become visible.
      Read committed: at the point transaction attempts promotion from "read" to "write", the system checks if the dataset has changed since the transaction started (called begin). If READ_PROMOTE, the dataset must not have changed; if READ_COMMITTED_PROMOTE any intermediate changes are visible but the application can not assume any data it has read in the transaction is the same as it was at the point the transaction started.
    • WRITE

      public static final TxnType WRITE
    • READ_PROMOTE

      public static final TxnType READ_PROMOTE
    • READ_COMMITTED_PROMOTE

      public static final TxnType READ_COMMITTED_PROMOTE
  • Method Details

    • values

      public static TxnType[] 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 TxnType 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
    • convert

      public static TxnType convert(ReadWrite rw)
      Convert a ReadWrite mode to TxnType
    • convert

      public static ReadWrite convert(TxnType txnType)
      Convert a TxnType mode to ReadWrite : "promote" not supported.
    • initial

      public static ReadWrite initial(TxnType txnType)
      Translate a TxnType to it's initial ReadWrite mode. WRITE -> WRITE, READ* -> READ regardless of promotion setting.
    • promote

      public static TxnType promote(Transactional.Promote promoteMode)
      Convert a TxnType mode to ReadWrite : "promote" not supported.