|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LockAdapter
The lock adapter is used as a generic interface to an object's locks. It is
created by a file system's LockAdapterFactory. A lock adapter
contains one or more locks that are identified by identifier objects. The
locks use the file system's LockAcquiringStrategy when locking.
| Method Summary | |
|---|---|
void |
createLockForIdentifier(Object identifier)
Create a lock for the unique (in the lock adapter instance) identifier. |
Lock |
getLock(Object identifier)
Get the lock identified by the identifier. |
| Method Detail |
|---|
void createLockForIdentifier(Object identifier)
throws IllegalArgumentException
This must be called before using a lock to ensure that it exists in the lock adapter. It typically called by the lock-using object's constructor.
Locks created by calling this method can later be retrieved by calling
getLock(Object).
identifier - An identifier that is unique for the lock-using object.
This may be any kind of object, a static Object constant, for
instance.
IllegalArgumentException - If there already is a lock for the same
identifier.Lock getLock(Object identifier)
createLockForIdentifier(Object) before it can
be retrieved by this method.
identifier - The identifier for the lock. The identifier for each
defined lock is unique in the lock adapter instance.
null if no lock is defined for the
identifier.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||