Package org.apache.jena.query
Enum TxnType
- java.lang.Object
-
- java.lang.Enum<TxnType>
-
- org.apache.jena.query.TxnType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description READTransaction mode:WRITE: this guarantees a WRITE will complete ifcommit()is called.READ_COMMITTED_PROMOTEREAD_PROMOTEWRITE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TxnTypeconvert(ReadWrite rw)Convert aReadWritemode toTxnTypestatic ReadWriteconvert(TxnType txnType)Convert aTxnTypemode toReadWrite: "promote" not supported.static ReadWriteinitial(TxnType txnType)Translate aTxnTypeto it's initialReadWritemode.static TxnTypepromote(Transactional.Promote promoteMode)Convert aTxnTypemode toReadWrite: "promote" not supported.static TxnTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TxnType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ
public static final TxnType READ
Transaction mode:WRITE: this guarantees a WRITE will complete ifcommit()is called. The same asbegin(ReadWrite.WRITE).READ: the transaction can not promote to WRITE,ensuring read-only access to the data. The same asbegin(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.
begin). IfREAD_PROMOTE, the dataset must not have changed; ifREAD_COMMITTED_PROMOTEany 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 Detail
-
values
public static TxnType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TxnType c : TxnType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TxnType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
convert
public static ReadWrite convert(TxnType txnType)
Convert aTxnTypemode toReadWrite: "promote" not supported.
-
initial
public static ReadWrite initial(TxnType txnType)
Translate aTxnTypeto it's initialReadWritemode.WRITE -> WRITE,READ* -> READregardless of promotion setting.
-
promote
public static TxnType promote(Transactional.Promote promoteMode)
Convert aTxnTypemode toReadWrite: "promote" not supported.
-
-