Interface ManagedClusterLockService

All Superinterfaces:
ClusterLockService

public interface ManagedClusterLockService extends ClusterLockService
Decorates a cluster lock service with management concerns, such as instrumentation.
Since:
v0.2
  • Method Details

    • getAllKnownClusterLocks

      Collection<? extends ManagedClusterLock> getAllKnownClusterLocks()
      Returns all the cluster locks that are currently known to this cluster lock service.

      The specifics are mostly left up to the implementation, with the following caveats:

      • It MUST include all locks that are currently locked by this node.
      • It SHOULD include all locks that are still strongly referenced outside of the cluster lock service, if possible. Implementations that are unable to comply with this requirement MUST clearly document that limitation.
      • It MAY include locks that were previously accessed but are no longer in use, even those that are no longer strongly referenced outside of the cluster lock service.
      • It MAY include locks that have not been accessed by this node but are still known to the service through the activity of other nodes within the cluster.

      Consumers MUST NOT rely on this method for the correctness of their locking behaviour. This information is intended for instrumentation and other similar management concerns, only.

      Returns:
      all cluster locks that are currently known to this service, in no particular order
    • getStatusesOfAllHeldClusterLocks

      @Nonnull Collection<ClusterLockStatus> getStatusesOfAllHeldClusterLocks()
      Returns lock status of every cluster lock being held.

      This is intended to provide additional information about misbehaving locks and thus this method should return the most up-to-date and non-cached data.

      Consumers must be aware that not all implementations can return a valid update time of the locks.

      Returns:
      a collection of cluster lock statuses, in no particular order