Package com.j_spaces.kernel.locks
Class AllInCacheLockManager<T extends ILockObject>
java.lang.Object
com.j_spaces.kernel.locks.AllInCacheLockManager<T>
- All Implemented Interfaces:
IBasicLockManager<T>
public class AllInCacheLockManager<T extends ILockObject>
extends Object
implements IBasicLockManager<T>
TODO add Javadoc
- Since:
- 6.6 lock manager implementation for all-in-cache, we always lock the object itself
- Version:
- 1.0
- Author:
- Yechiel Fefer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfreeLockObject(ILockObject lockObject) free the lock object - no more needed by this threadgetLockObject(String subjectUid) based only on subject's uid, return a lock object in order to lock the represented subject this method is relevant only for evictable objectsgetLockObject(T subject) based on subject, return a lock object in order to lock the represented subject.booleanisEntryLocksItsSelf(T entry) true if the lock object is the subject itself (i.e.
-
Constructor Details
-
AllInCacheLockManager
public AllInCacheLockManager()
-
-
Method Details
-
getLockObject
Description copied from interface:IBasicLockManagerbased on subject, return a lock object in order to lock the represented subject.If the subject is part of evictable from space (like lru) or evicatble from cache (like in TieredStorage with cache rule) we use the subject itself, otherwise we use per-logical subject a different object.
Note - template and transient entry are not evictable.
- Specified by:
getLockObjectin interfaceIBasicLockManager<T extends ILockObject>- Returns:
- the lock object
-
getLockObject
Description copied from interface:IBasicLockManagerbased only on subject's uid, return a lock object in order to lock the represented subject this method is relevant only for evictable objects- Specified by:
getLockObjectin interfaceIBasicLockManager<T extends ILockObject>- Returns:
- the lock object
-
freeLockObject
Description copied from interface:IBasicLockManagerfree the lock object - no more needed by this thread- Specified by:
freeLockObjectin interfaceIBasicLockManager<T extends ILockObject>- Parameters:
lockObject- the lock object
-
isEntryLocksItsSelf
Description copied from interface:IBasicLockManagertrue if the lock object is the subject itself (i.e. entry or template), false if it is representing object. Note - this method is for entries only!.- Specified by:
isEntryLocksItsSelfin interfaceIBasicLockManager<T extends ILockObject>- Returns:
- true if is the subject itself
-