|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISMLocking
ISMLocking
defines an interface for a locking strategy of an
ItemStateManager
.
ISMLocking
must meet the following
requirements:
I
an
implementation must ensure that no write lock is issued for a change log
that contains a reference to an item with id I
.C
an
implementation must ensure that no read lock is issued for an item that is
contained in C
, unless the current thread is the owner of the
write lock!C
an
implementation must ensure that no write lock is issued for a change log
C'
that intersects with C
. That is both change
logs contain a reference to the same item. Please note that an implementation
is free to block requests entirely for additional write lock while a write
lock is active. It is not a requirement to support concurrent write locks.
Nested Class Summary | |
---|---|
static interface |
ISMLocking.ReadLock
|
static interface |
ISMLocking.WriteLock
|
Method Summary | |
---|---|
ISMLocking.ReadLock |
acquireReadLock(ItemId id)
Acquire a read lock for the given item id . |
ISMLocking.WriteLock |
acquireWriteLock(ChangeLog changeLog)
Acquires a write lock for the given changeLog . |
Method Detail |
---|
ISMLocking.ReadLock acquireReadLock(ItemId id) throws InterruptedException
id
.
id
- an item id.
InterruptedException
ISMLocking.WriteLock acquireWriteLock(ChangeLog changeLog) throws InterruptedException
changeLog
.
changeLog
- the change log
changeLog
.
InterruptedException
- if the thread is interrupted while creating
the write lock.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |