public class ServiceStateTransition extends Object
| Modifier and Type | Field and Description |
|---|---|
private List<CompletableFuture<?>> |
disabledFutures |
private List<CompletableFuture<?>> |
enabledFutures |
private Lock |
readLock |
private ReadWriteLock |
rwLock |
private ControllerServiceState |
state |
private Lock |
writeLock |
| Constructor and Description |
|---|
ServiceStateTransition() |
| Modifier and Type | Method and Description |
|---|---|
void |
disable() |
boolean |
enable() |
ControllerServiceState |
getState() |
boolean |
transitionToDisabling(ControllerServiceState expectedState,
CompletableFuture<?> disabledFuture) |
boolean |
transitionToEnabling(ControllerServiceState expectedState,
CompletableFuture<?> enabledFuture) |
private ControllerServiceState state
private final List<CompletableFuture<?>> enabledFutures
private final List<CompletableFuture<?>> disabledFutures
private final ReadWriteLock rwLock
private final Lock writeLock
private final Lock readLock
public boolean transitionToEnabling(ControllerServiceState expectedState, CompletableFuture<?> enabledFuture)
public boolean enable()
public boolean transitionToDisabling(ControllerServiceState expectedState, CompletableFuture<?> disabledFuture)
public void disable()
public ControllerServiceState getState()
Copyright © 2021 Apache NiFi Project. All rights reserved.