|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xvsm.interfaces.ICoordinator
org.xvsm.interfaces.IExplicitCoordinator
org.xvsm.coordinators.GenericKeyCoordinator
public class GenericKeyCoordinator
Field Summary |
---|
Fields inherited from class org.xvsm.interfaces.ICoordinator |
---|
properties |
Constructor Summary | |
---|---|
GenericKeyCoordinator()
Default Constructor. |
Method Summary | |
---|---|
void |
commit(Transaction tx)
Commits an existing Transaction for this container. |
void |
commitSubTransaction(Transaction tx)
Commits an existing Transaction for this container. |
void |
delete(Transaction tx,
Entry e)
Deletes one specific entry. |
java.lang.Class<? extends Selector> |
getDefaultSelector()
Returns the default Selector for this Coordinator. |
java.util.List<Entry> |
read(Transaction tx,
Selector selector,
java.util.List<Entry> centries)
Read Entry s that match with the Selector. |
void |
rollback(Transaction tx)
Does a rollback on this Transaction . |
void |
setMaxContainerSize(int size)
Sets the maximal containersize in the coordinator. |
Entry |
shift(Entry e,
Transaction tx,
Selector s)
Writes the Entry. |
void |
write(Entry e,
Transaction tx,
Selector s)
Tries to write the given Entry. |
Methods inherited from class org.xvsm.interfaces.ICoordinator |
---|
aquireLock, commitLocks, getCref, getProperties, rollbackLocks, setCref, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericKeyCoordinator()
Method Detail |
---|
public void commit(Transaction tx) throws TransactionLockException
Transaction
for this container..
commit
in class ICoordinator
tx
- The Transaction
that should be commited.
TransactionLockException
- thrown if a lock can not be aquired.public void commitSubTransaction(Transaction tx) throws TransactionLockException
Transaction
for this container.
commitSubTransaction
in class ICoordinator
tx
- The Transaction
that should be commited.
TransactionLockException
public void delete(Transaction tx, Entry e) throws TransactionLockException
delete
in class ICoordinator
tx
- A Transaction under which the operation executese
- The entry to delete.
TransactionLockException
- thrown if a lock can not be aquired because another
transaction uses it.public java.util.List<Entry> read(Transaction tx, Selector selector, java.util.List<Entry> centries) throws TransactionLockException, CountNotMetException
Entry
s that match with the Selector..
read
in class ICoordinator
tx
- A Transaction under which the operation executesselector
- The Selector that must match.centries
- A List
of Entry
s to operate on. Null if it
should operates on all known entries.
TransactionLockException
- thrown if a lock can not be aquired because another
transaction uses it.
CountNotMetException
- thrown if there are not enough entries to fulfill the count
of the selector.public void rollback(Transaction tx) throws TransactionLockException
Transaction
..
rollback
in class ICoordinator
tx
- The Transaction
that should perform a rollback.
TransactionLockException
- thrown if a lock can not be aquired.public void setMaxContainerSize(int size)
setMaxContainerSize
in class ICoordinator
size
- the maximal size of entries in the coordinator.public Entry shift(Entry e, Transaction tx, Selector s) throws TransactionLockException, CannotShiftException
shift
in class ICoordinator
e
- The Entry
that will be written.tx
- A Transaction under which the operation executess
- the Selector used for writing.
Entry
of null
if no entry has
been shifted.
TransactionLockException
- thrown if a lock can not be aquired because another
transaction uses it.
CannotShiftException
- thrown if the coordinator can not decide which entry has to
be shifted.public void write(Entry e, Transaction tx, Selector s) throws ContainerFullException, TransactionLockException
ContainerFullException
can be raised..
write
in class ICoordinator
e
- The Entry
that will be written.tx
- A Transaction under which the operation executess
- the Selector used for writing.
ContainerFullException
- thrown when the entry can not be written because there is no
free place for it (e.g. full bounded container, vector
position already used, key already present).
TransactionLockException
- thrown if a lock can not be aquired because another
transaction uses it.public java.lang.Class<? extends Selector> getDefaultSelector()
Selector
for this Coordinator..
getDefaultSelector
in class ICoordinator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |