Package org.neo4j.ogm.transaction
Interface Transaction
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractTransaction
- Author:
- Vince Bickers
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this transaction can be committedvoidclose()close this transaction.voidcommit()commit a transaction that has pending writesbooleanObtains the read-only status of a transaction.voidrollback()rollback a transaction that has pending writesstatus()return the status of the current transactiontype()Returns type of the transaction - READ_ONLY / READ_WRITE The value corresponds to type returned byisReadOnly()
-
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
-
status
Transaction.Status 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
Transaction.Type type()Returns type of the transaction - READ_ONLY / READ_WRITE The value corresponds to type returned byisReadOnly()- Returns:
- type of the transaction
-
close
void close()close this transaction.- Specified by:
closein interfaceAutoCloseable
-