public abstract class AbstractTransaction extends Object implements Transaction
Transaction.Status, Transaction.Type| Modifier and Type | Field and Description |
|---|---|
protected TransactionManager |
transactionManager |
protected Transaction.Type |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTransaction(TransactionManager transactionManager) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCommit()
If this transaction can be committed
|
void |
close()
close this transaction.
|
void |
commit()
commit a transaction that has pending writes
|
void |
extend(Transaction.Type otherType)
Extends the current transaction.
|
long |
extensions() |
boolean |
isReadOnly()
Obtains the read-only status of a transaction.
|
List<Object> |
registeredNew() |
void |
registerNew(Object persisted) |
void |
rollback()
rollback a transaction that has pending writes
|
Transaction.Status |
status()
return the status of the current transaction
|
Transaction.Type |
type()
Returns type of the transaction - READ_ONLY / READ_WRITE
The value corresponds to type returned by
Transaction.isReadOnly() |
protected final TransactionManager transactionManager
protected Transaction.Type type
protected AbstractTransaction(TransactionManager transactionManager)
public void rollback()
Transactionrollback in interface Transactionpublic void commit()
Transactioncommit in interface Transactionpublic boolean canCommit()
TransactioncanCommit in interface Transactionpublic void extend(Transaction.Type otherType)
otherType - type of the other transactionpublic final Transaction.Status status()
Transactionstatus in interface Transactionpublic boolean isReadOnly()
TransactionisReadOnly in interface Transactionpublic Transaction.Type type()
TransactionTransaction.isReadOnly()type in interface Transactionpublic void close()
Transactionclose in interface AutoCloseableclose in interface Transactionpublic long extensions()
public void registerNew(Object persisted)
Copyright © 2015–2023 Neo Technology, Inc.. All rights reserved.