|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.objectweb.jotm.impl.core.conflict.BasicConflictTable
BasicConflictTable is an implementation of conflict table. An example of a
conflict table construction:
In the example above, e.g., "balance" is not conflicting with any acquired
lock mode, while "withdraw" is conflicting with all of them.
String[] ops = {"balance", "deposit", "withdraw"};
boolean[][] cTable =
/* balance * / {{ false, false, false,},
/* deposit * / { false, false, true, },
/* withdraw * / { true, true, true }};
ConflictTable tab = new BasicConflictTable(ops, cTable);
| Constructor Summary | |
BasicConflictTable(java.lang.String[] iLocks,
boolean[][] iConflictTable)
Constructs conflict table. |
|
| Method Summary | |
java.lang.String[] |
getLockModes()
Gets lock modes. |
boolean |
isConflict(java.lang.String requestLock,
java.lang.String holdLock)
Tests if there is conflict between two lock modes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicConflictTable(java.lang.String[] iLocks,
boolean[][] iConflictTable)
iLocks - lock modesiConflictTable - table of conflicts, where the first index is the
requested lock mode and the second index the
acquired lock mode; true means there is a conflict,
false othrwise| Method Detail |
public java.lang.String[] getLockModes()
ConflictTable
getLockModes in interface ConflictTable
public boolean isConflict(java.lang.String requestLock,
java.lang.String holdLock)
throws ConflictUndefinedException
ConflictTable
isConflict in interface ConflictTablerequestLock - requested lock modeholdLock - hold lock mode
ConflictUndefinedException - if conflict between given lock modes is
undefined
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||