Class AtomixDistributedLock
- java.lang.Object
-
- org.onosproject.store.atomix.primitives.impl.AtomixDistributedLock
-
- All Implemented Interfaces:
org.onosproject.store.service.AsyncDistributedLock,org.onosproject.store.service.DistributedPrimitive
public class AtomixDistributedLock extends java.lang.Object implements org.onosproject.store.service.AsyncDistributedLockAtomix distributed lock.
-
-
Constructor Summary
Constructors Constructor Description AtomixDistributedLock(io.atomix.core.lock.AsyncAtomicLock atomixLock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<org.onosproject.store.service.Version>lock()java.lang.Stringname()java.util.concurrent.CompletableFuture<java.util.Optional<org.onosproject.store.service.Version>>tryLock()java.util.concurrent.CompletableFuture<java.util.Optional<org.onosproject.store.service.Version>>tryLock(java.time.Duration timeout)java.util.concurrent.CompletableFuture<java.lang.Void>unlock()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
name
public java.lang.String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
lock
public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Version> lock()
- Specified by:
lockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
tryLock
public java.util.concurrent.CompletableFuture<java.util.Optional<org.onosproject.store.service.Version>> tryLock()
- Specified by:
tryLockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
tryLock
public java.util.concurrent.CompletableFuture<java.util.Optional<org.onosproject.store.service.Version>> tryLock(java.time.Duration timeout)
- Specified by:
tryLockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
unlock
public java.util.concurrent.CompletableFuture<java.lang.Void> unlock()
- Specified by:
unlockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
-