public interface InterProcessLock
release() may throw an exception if the current thread does not own the lock| Modifier and Type | Method and Description |
|---|---|
void |
acquire()
Acquire the mutex - blocking until it's available.
|
boolean |
acquire(long time,
TimeUnit unit)
Acquire the mutex - blocks until it's available or the given time expires.
|
boolean |
isAcquiredInThisProcess()
Returns true if the mutex is acquired by a thread in this JVM
|
void |
release()
Perform one release of the mutex.
|
void acquire()
throws Exception
release()Exception - ZK errors, connection interruptionsboolean acquire(long time,
TimeUnit unit)
throws Exception
release()time - time to waitunit - time unitException - ZK errors, connection interruptionsvoid release()
throws Exception
Exception - ZK errors, interruptionsboolean isAcquiredInThisProcess()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.