-
Nested Class Summary
Nested Classes
-
Method Summary
boolean
If this transaction can be committed
default boolean
If this transaction can be rolled back.
void
void
commit a transaction that has pending writes
boolean
Obtains the read-only status of a transaction.
void
rollback a transaction that has pending writes
return the status of the current transaction
Returns type of the transaction - READ_ONLY / READ_WRITE
The value corresponds to type returned by
isReadOnly()
-
Method Details
-
rollback
void rollback()
rollback a transaction that has pending writes
-
commit
void commit()
commit a transaction that has pending writes
-
canCommit
boolean canCommit()
If this transaction can be committed
- Returns:
- true if this transaction can be committed
-
canRollback
default boolean canRollback()
If this transaction can be rolled back.
- Returns:
- true if this transaction can be rolled back
-
status
return the status of the current transaction
- Returns:
- the Status value associated with the current transaction
-
isReadOnly
boolean isReadOnly()
Obtains the read-only status of a transaction.
Transaction are read-write by default
- Returns:
- true if this is a read-only transaction, false otherwise
-
type
Returns type of the transaction - READ_ONLY / READ_WRITE
The value corresponds to type returned by
isReadOnly()
- Returns:
- type of the transaction
-