|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LockAcquiringStrategy
This interface defines a strategy for how a single lock is locked. All locks
that are locked by EntityFS methods (entity locks and internal state locks)
use a LockAdapter together with the file system's lock acquiring
strategy. This makes it possible for the client creating the file system to
set a file system-global policy for how locks should be acquired. The policy
can for instance say if locking calls can time out. synchronized is
not used anywhere in EntityFS.
LockAdapter| Method Summary | |
|---|---|
EntityLock |
getEntityLock(Object identifier,
EntityLockAdapter la,
LogAdapter lga)
Get a custom entity lock for an entity from its lock adapter. |
Lock |
getLock(Object identifier,
LockAdapter la,
LogAdapter lga)
Lock a custom lock that is not tied to any specific entity. |
EntityLock |
getReadLock(EntityLockAdapter la,
LogAdapter lga)
Get a locked read lock for an entity from its lock adapter. |
EntityLock |
getWriteLock(EntityLockAdapter la,
LogAdapter lga)
Get a locked write lock for an entity from its lock adapter. |
| Method Detail |
|---|
EntityLock getReadLock(EntityLockAdapter la,
LogAdapter lga)
la - The entity's lock adapter.lga - The file system's current log adapter.
EntityLock getWriteLock(EntityLockAdapter la,
LogAdapter lga)
la - The entity's lock adapter.lga - The file system's current log adapter.
EntityLock getEntityLock(Object identifier,
EntityLockAdapter la,
LogAdapter lga)
createEntityLockForIdentifier(Object, boolean, boolean) method before it
can be locked.
identifier - The unique identifier for the lock.la - The entity's lock adapterlga - The file system's current log adapter.
ClassCastException - If the lock was registered with the entity
lock adapter's createLockForIdentifier(Object) method...
Lock getLock(Object identifier,
LockAdapter la,
LogAdapter lga)
createLockForIdentifier(Object) method before it can be locked.
identifier - The unique identifier for the lock.la - The lock adapter.lga - A log adapter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||