T - The client Snapshot type.public class TransactionAdapter<T> extends Object implements Transaction<T>
Transaction interface.| Constructor and Description |
|---|
TransactionAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
committed(T data)
Implementation of this method must contain all the I/O and post transactional processing.
|
boolean |
run(T data)
Implements the
Transaction.run(Object) method by always returning true, to guarantee consequent
invocation of Transaction.committed(Object). |
public void committed(T data) throws Exception
Transactioncommitted in interface Transaction<T>data - Shared memory data after commit.Exception - Runtime exception will be propagated unchanged while checked exception will be wrapped into
InvocationException.public boolean run(T data) throws Exception
Transaction.run(Object) method by always returning true, to guarantee consequent
invocation of Transaction.committed(Object).
Implementation of this method must include in-transactional code and manipulations with shared memory. Any exception thrown by this method will cancel the transaction.
run in interface Transaction<T>data - The shared memory data.true to commit, false to rollback.Exception - Runtime exception will be propagated unchanged while checked exception will be wrapped into
InvocationException.Copyright © 2013 CERN, The European Organization for Nuclear Research. All Rights Reserved.