|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface that represents the contract of an Oreo DataSource that supports transactions. Note that this interface defines methods for the basic CRUD operations that take an extra parameter, the txnID (transaction ID). To start a transaction, you use the newTransaction() method to get a transactionID parameter. In a web-based application the txnID is a parameter that becomes associated with a user session. Note that concrete implementations of this interface will typically wrap some external transactional data source, so the exact transaction isolation semantics will depend on the underlying implementation.
Method Summary | |
void |
abortTransaction(java.lang.String txnID)
cancel the transaction associated with the ID |
void |
commit(java.lang.String txnID)
Commit the transaction that is identified by this txnID |
void |
delete(java.lang.String type,
java.lang.Object key,
java.lang.String txnID)
delete the Record of the given type and primary key taking into account the transaction which this is part of. |
Record |
get(java.lang.String type,
java.lang.Object key,
java.lang.String txnID)
|
Transaction |
getTransaction(java.lang.String txnID)
|
void |
insert(Record rec,
java.lang.String txnID)
update the Record taking into account the transaction which this is part of. |
java.lang.String |
newTransaction()
|
void |
rollback(java.lang.String txnID)
Roll back the transaction |
java.util.List |
select(RecordFilter filter,
java.lang.String txnID)
|
void |
update(Record oldRec,
Record newRec,
java.lang.String txnID)
update the Record taking into account the transaction which this is part of. |
Methods inherited from interface org.oreodata.OreoDataSource |
addDataListener, close, delete, delete, get, get, getName, init, insert, keys, keys, lookup, reload, reload, removeDataListener, select, select, update, wipeCache, writeElement, writeSnapshot |
Methods inherited from interface org.oreodata.DataListener |
handleEvent |
Method Detail |
public void insert(Record rec, java.lang.String txnID) throws java.io.IOException
java.io.IOException
public void update(Record oldRec, Record newRec, java.lang.String txnID) throws java.io.IOException
java.io.IOException
public void delete(java.lang.String type, java.lang.Object key, java.lang.String txnID) throws java.io.IOException
java.io.IOException
public Record get(java.lang.String type, java.lang.Object key, java.lang.String txnID) throws java.io.IOException
java.io.IOException
public java.util.List select(RecordFilter filter, java.lang.String txnID) throws java.io.IOException
java.io.IOException
public void commit(java.lang.String txnID) throws java.io.IOException
java.io.IOException
public void rollback(java.lang.String txnID) throws java.io.IOException
java.io.IOException
public java.lang.String newTransaction() throws java.io.IOException
java.io.IOException
public void abortTransaction(java.lang.String txnID) throws java.io.IOException
java.io.IOException
public Transaction getTransaction(java.lang.String txnID) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |