|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
ConflictManager is the entity that takes care of concurrency control
in JOTM. There are two basic concurrency control means:
ConflictTable: An entity that for a pair of operations maintains
the information whether they are conflicting. Typically, The Conflict Manager
maintains many conflict tables for various object types. It's also possible
to use the classical read/write paradigm and use the only one table with
conflicts defined for the read and write operations.
TransactionConflict: An ignore-conflict relationship can be created
by a transaction for an object it has acquired. Then, even two operations
op1 and op2 are conflicting according to a conflict table, if a transaction
t1 that holds a lock op1 on an object obj created an ignore-conflict relationship
with another transaction t2 to ignore conflict between op1 and op2 on obj,
then t2 can get the lock op2 on obj.
| Method Summary | |
void |
addConflictTable(java.lang.Class cl,
ConflictTable cTable)
Add a new conflict table. |
void |
addConflictTable(java.lang.Object obj,
ConflictTable cTable)
Add a new conflict table. |
void |
addIgnoreConflict(TransactionConflict txConflict)
Add a new ignore-conflict relationship. |
Conflict |
getConflict(BasicTransaction holdTx,
BasicTransaction requestTx,
java.lang.String holdOperation,
java.lang.String requestOperation,
java.lang.Object obj)
Get conflict. |
void |
removeConflictTable(java.lang.Class cl,
ConflictTable cTable)
Remove a conflict table associated with the given type. |
void |
removeConflictTable(java.lang.Object obj,
ConflictTable cTable)
Remove a conflict table associated with the given object. |
void |
removeIgnoreConflict(TransactionConflict txConflict)
Remove given ignore-connflict relationship. |
| Method Detail |
public void addConflictTable(java.lang.Class cl,
ConflictTable cTable)
cl - type of objects to apply the conflict tablecTable - conflict table
public void addConflictTable(java.lang.Object obj,
ConflictTable cTable)
obj - object to apply the conflict tablecTable - conflict table
public void removeConflictTable(java.lang.Class cl,
ConflictTable cTable)
cl - type of objects the conflict table is applied tocTable - conflict table
public void removeConflictTable(java.lang.Object obj,
ConflictTable cTable)
obj - object the conflict table is applied tocTable - conflict table
public void addIgnoreConflict(TransactionConflict txConflict)
throws InvalidConflictException
txConflict - ignore-conflict relationship to be added
InvalidConflicException - operations do not match the object
InvalidConflictExceptionpublic void removeIgnoreConflict(TransactionConflict txConflict)
txConflict - ignore-conflict relationship to be removed
public Conflict getConflict(BasicTransaction holdTx,
BasicTransaction requestTx,
java.lang.String holdOperation,
java.lang.String requestOperation,
java.lang.Object obj)
holdTx - transaction holding a lock on the objectrequestTx - transaction requesting a lock on the objectholdOperation - operation (lock type) beeing heldrequestOperation - operation (lock type) beeing requestedobj - object to share
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||