|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Locker
We need "select for update" semantics in a number of places in the sla manager persistence code. However, GRIA supports different RDBMS backends, some of which (e.g. hypersonic) do not fully support transacations, or pessimistic locking.
Different Locker implementations are therefore used for using database locking
or Java locking of entities.
Note that Locker implementations are treated as singletons and therefore should be thread safe.
| Method Summary | |
|---|---|
Object |
pessimisticLock(Class entityClass,
Serializable id)
|
void |
unlock(Class entityClass,
Serializable id)
This method removes a lock. |
void |
unlockAll()
This method unlocks all entities that were locked with pessimisticLock by the current thread. |
| Method Detail |
|---|
Object pessimisticLock(Class entityClass,
Serializable id)
void unlock(Class entityClass,
Serializable id)
Furthermore, implemenations should be tolerant of client errors and therefore must not throw runtime exceptions.
void unlockAll()
pessimisticLock by the current thread.
Only the locking thread can unlock.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||