public interface Transaction extends Paged
Paged
resource.
The transaction provides snapshot isolation. The snapshot view
of the entire page file is obtained the first time you read data
from a page. Committed page updates from concurrent transactions will
not be visible to the snapshot.
The snapshot view of the page file is released once the transaction
commits or is rolled back. Avoid holding a snapshot view for a long time.
The page file cannot reclaim temporary processing space associated with
a snapshot and subsequent snapshots while the snapshot is in use.
Pages are optimistically updated, which means they are not locked for
update. Updating a page or committing the transaction may fail
with an if another committed transaction
has updated the same page this transaction was trying to update.Paged.SliceType
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes a transaction object.
|
void |
commit() |
boolean |
isReadOnly() |
void |
onFlush(Runnable runnable)
Committed transactions do not get written to physical media immediately, they get
batched up with other Transaction to increase update throughput.
|
void |
rollback() |
boolean isReadOnly()
void commit() throws OptimisticUpdateException
OptimisticUpdateException
- is thrown if the update would conflict with a concurrent
updated performed by another thread.void rollback()
void close()
void onFlush(Runnable runnable)
runnable
- Copyright © 2009–2016 FuseSource, Corp.. All rights reserved.