org.exolab.castor.persist
public interface DepositBox
Checking for accessMode will be done to each access of the DepositBox. Only if a transaction has write access may setObject() or java.lang.IllegalArgumentException will be thrown.
Only if a transaction with read or write access may call getObject(). Multiple transactions may own read access of the same DespositBox at the same time. Only one transaction may own write access at any given time.
Every time setObject() is called, the internal timestamp will be updated.
Method Summary | |
---|---|
Object[] | getObject(TransactionContext tx)
Get the object from the DespositBox, only the transaction
have the read or write lock can get it.
|
long | getTimeStamp()
Get the time of the most recent call on setObject(Object)}. |
void | setObject(TransactionContext tx, Object[] object)
Set an object into the DespositBox, only a transaction
has the write lock may call it method or IllegalArgumentException
will be thrown.
|
Parameters: tx the transaction in action
Returns: An object instance.
Throws: IllegalArgumentException if tx doesn't own the box
Returns: The timestamp of this object.
Parameters: tx the transaction in action object to be store into deposit box
Throws: IllegalArgumentException if tx doesn't own the box