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 Object implements org.onosproject.store.service.AsyncDistributedLock
Atomix 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 CompletableFuture<org.onosproject.store.service.Version>lock()Stringname()CompletableFuture<Optional<org.onosproject.store.service.Version>>tryLock()CompletableFuture<Optional<org.onosproject.store.service.Version>>tryLock(Duration timeout)CompletableFuture<Void>unlock()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
lock
public CompletableFuture<org.onosproject.store.service.Version> lock()
- Specified by:
lockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
tryLock
public CompletableFuture<Optional<org.onosproject.store.service.Version>> tryLock()
- Specified by:
tryLockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
tryLock
public CompletableFuture<Optional<org.onosproject.store.service.Version>> tryLock(Duration timeout)
- Specified by:
tryLockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
unlock
public CompletableFuture<Void> unlock()
- Specified by:
unlockin interfaceorg.onosproject.store.service.AsyncDistributedLock
-
-