-
Notifications
You must be signed in to change notification settings - Fork 434
Multi Shared Lock
A container that manages multiple locks as a single entity. When acquire() is called, all the locks are acquired. If that fails, any paths that were acquired are released. Similarly, when release() is called, all locks are released (failures are ignored).
- InterProcessMultiLock
- InterProcessLock
public InterProcessMultiLock(List<InterProcessLock> locks)
Creates a multi lock of any type of inter process lock
Parameters:
locks - the locks
public InterProcessMultiLock(CuratorFramework client,
List<String> paths)
Creates a multi lock of InterProcessMutexes
Parameters:
client - client
paths - list of paths to manage in the order that they are to be locked
The usage is the same as for Shared Lock. However, When acquire() is called, all the locks are acquired. If that fails, any paths that were acquired are released. Similarly, when release() is called, all locks are released (failures are ignored).
It is strongly recommended that you add a ConnectionStateListener
and watch for SUSPENDED and LOST state changes. If a SUSPENDED state is reported you cannot be certain that you still hold the lock unless you subsequently receive a RECONNECTED state. If a LOST state is reported it is certain that you no longer hold the lock.
- Curator
- Javadoc
- Coverage Report
- Getting Started
- Examples
- FAQ
- Client
- Framework
-
Recipes
- Leader Latch
- Leader Election
- Shared Reentrant Lock
- Shared Lock
- Shared Reentrant Read Write Lock
- Shared Semaphore
- Multi Shared Lock
- Distributed Queue
- Distributed Id Queue
- Distributed Priority Queue
- Distributed Delay Queue
- Simple Distributed Queue
- Barrier
- Double Barrier
- Shared counter
- Distributed Atomic Long
- Path Cache
- Node Cache
- Utilities – Test Server, Test Cluster, ZKPaths, EnsurePath, QueueSharder, Reaper, ChildReaper
- Tech Notes
- Errors
- Exhibitor Integration
- Extensions
- Logging and Tracing