Class AbstractLockStore<T extends ConcurrentMap<NodeRef,LockState>>

java.lang.Object
org.alfresco.repo.lock.mem.AbstractLockStore<T>
All Implemented Interfaces:
LockStore
Direct Known Subclasses:
LockStoreImpl

public abstract class AbstractLockStore<T extends ConcurrentMap<NodeRef,LockState>> extends Object implements LockStore
Base class for LockStore implementations that use a ConcurrentMap as storage.
Author:
Matt Ward
  • Field Details

  • Constructor Details

    • AbstractLockStore

      public AbstractLockStore(T map)
  • Method Details

    • get

      public LockState get(NodeRef nodeRef)
      Specified by:
      get in interface LockStore
    • set

      public void set(NodeRef nodeRef, LockState lockState)
      Specified by:
      set in interface LockStore
    • clear

      public void clear()
      Description copied from interface: LockStore
      WARNING: only use in test code - unsafe method for production use. TODO: remove this method?
      Specified by:
      clear in interface LockStore
    • getTxMap

      protected Map<NodeRef,LockState> getTxMap()
      Returns a transactionally scoped Map that is used to provide repeatable lock store queries for a given NodeRef. If no transaction is present, then null is returned.
      Returns:
      Transactional Map or null if not available.
    • getNodes

      public Set<NodeRef> getNodes()
      Specified by:
      getNodes in interface LockStore