@Service public class MutexExecutionManager extends Object implements org.onosproject.store.service.MutexExecutionService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cluster.ClusterService |
clusterService |
protected org.onosproject.cluster.NodeId |
localNodeId |
protected org.onosproject.store.service.ConsistentMap<String,org.onosproject.store.primitives.impl.MutexExecutionManager.MutexState> |
lockMap |
protected org.onosproject.store.service.StorageService |
storageService |
| Constructor and Description |
|---|
MutexExecutionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
deactivate() |
CompletableFuture<Void> |
execute(org.onosproject.store.service.MutexTask task,
String exclusionPath,
Executor executor) |
protected CompletableFuture<org.onosproject.store.primitives.impl.MutexExecutionManager.MutexState> |
lock(String exclusionPath) |
protected void |
tryLock(String exclusionPath)
Attempts to acquire lock for a path.
|
protected void |
unlock(String exclusionPath)
Releases lock for the specific path.
|
protected org.onosproject.store.service.ConsistentMap<String,org.onosproject.store.primitives.impl.MutexExecutionManager.MutexState> lockMap
protected org.onosproject.cluster.NodeId localNodeId
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterService clusterService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Activate public void activate()
@Deactivate public void deactivate()
public CompletableFuture<Void> execute(org.onosproject.store.service.MutexTask task, String exclusionPath, Executor executor)
execute in interface org.onosproject.store.service.MutexExecutionServiceprotected CompletableFuture<org.onosproject.store.primitives.impl.MutexExecutionManager.MutexState> lock(String exclusionPath)
protected void tryLock(String exclusionPath)
exclusionPath - exclusion pathprotected void unlock(String exclusionPath)
exclusionPath - exclusion pathCopyright © 2016. All rights reserved.