Class EmbeddedClusteredLockManager

  • All Implemented Interfaces:
    org.infinispan.lock.api.ClusteredLockManager

    @MBean(objectName="ClusteredLockManager",
           description="Component to manage clustered locks")
    public class EmbeddedClusteredLockManager
    extends Object
    implements org.infinispan.lock.api.ClusteredLockManager
    The Embedded version for the lock cluster manager
    Since:
    9.2
    Author:
    Katia Aresti, karesti@redhat.com
    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • defineLock

        public boolean defineLock​(String name)
        Specified by:
        defineLock in interface org.infinispan.lock.api.ClusteredLockManager
      • defineLock

        public boolean defineLock​(String name,
                                  org.infinispan.lock.api.ClusteredLockConfiguration configuration)
        Specified by:
        defineLock in interface org.infinispan.lock.api.ClusteredLockManager
      • get

        public org.infinispan.lock.api.ClusteredLock get​(String name)
        Specified by:
        get in interface org.infinispan.lock.api.ClusteredLockManager
      • getConfiguration

        public org.infinispan.lock.api.ClusteredLockConfiguration getConfiguration​(String name)
        Specified by:
        getConfiguration in interface org.infinispan.lock.api.ClusteredLockManager
      • isDefined

        @ManagedOperation(description="Returns true if the lock is defined",
                          displayName="Is Lock Defined",
                          name="isDefined")
        public boolean isDefined​(String name)
        Specified by:
        isDefined in interface org.infinispan.lock.api.ClusteredLockManager
      • removeSync

        @ManagedOperation(description="Removes the lock from the cluster. The lock has to be recreated to access next time.",
                          displayName="Remove Clustered Lock",
                          name="remove")
        public boolean removeSync​(String name)
      • forceRelease

        public CompletableFuture<Boolean> forceRelease​(String name)
        Specified by:
        forceRelease in interface org.infinispan.lock.api.ClusteredLockManager
      • forceReleaseSync

        @ManagedOperation(description="Forces a release of the lock if such exist",
                          displayName="Release Clustered Lock",
                          name="forceRelease")
        public boolean forceReleaseSync​(String name)
      • isLockedSync

        @ManagedOperation(description="Returns true if the lock exists and is acquired",
                          displayName="Is Locked",
                          name="isLocked")
        public boolean isLockedSync​(String name)