public class HazelcastClusterLockService extends Object implements ClusterLockService
ClusterLockService. This implementation uses an IMap and
locks on keys in the IMap. This is more efficient than creating separate ILocks for each requested lock
because ILocks come with non-negligible DistributedObject overhead and IMap locks are
automatically garbage collected.| Constructor and Description |
|---|
HazelcastClusterLockService(com.hazelcast.core.HazelcastInstance hazelcast) |
| Modifier and Type | Method and Description |
|---|---|
ClusterLock |
getLockForName(String lockName)
Returns the cluster-wide lock for the given name.
|
public HazelcastClusterLockService(com.hazelcast.core.HazelcastInstance hazelcast)
public ClusterLock getLockForName(@Nonnull String lockName)
ClusterLockServicegetLockForName in interface ClusterLockServicelockName - the globally unique lock identifierCopyright © 2019 Atlassian. All rights reserved.