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 Type
    Method
    Description
    void
    free the lock object - no more needed by this thread
    getLockObject(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 objects
    getLockObject(T subject)
    based on subject, return a lock object in order to lock the represented subject.
    boolean
    true if the lock object is the subject itself (i.e.
  • Method Details

    • getLockObject

      ILockObject getLockObject(T subject)
      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

      ILockObject getLockObject(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 objects
      Returns:
      the lock object
    • freeLockObject

      void freeLockObject(ILockObject lockObject)
      free the lock object - no more needed by this thread
      Parameters:
      lockObject - the lock object
    • isEntryLocksItsSelf

      boolean isEntryLocksItsSelf(T entry)
      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