Package com.j_spaces.kernel.locks
Interface IBasicLockManager<T extends ILockObject>
- All Known Implementing Classes:
AllInCacheLockManager,BasicEvictableLockManager,BlobStoreLockManager,MVCCLockManager,TieredStorageLockManager
public interface IBasicLockManager<T extends ILockObject>
- Since:
- 6.5 contains the basic methods for acuring a lock object- i.e. an object that will be locked in order to lock the entity (entry or template) represented by it
- Version:
- 1.0
- Author:
- Yechiel Fefer
-
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.
-
Method Details
-
getLockObject
based 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.
- Returns:
- the lock object
-
getLockObject
based only on subject's uid, return a lock object in order to lock the represented subject this method is relevant only for evictable objects- Returns:
- the lock object
-
freeLockObject
free the lock object - no more needed by this thread- Parameters:
lockObject- the lock object
-
isEntryLocksItsSelf
true 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!.- Returns:
- true if is the subject itself
-