Add new method isStateMachineManaged
Determines if the given machine identifier denotes a known managed state machine.
This commit is contained in:
committed by
Janne Valkealahti
parent
7df664d306
commit
675fdf07de
@@ -128,6 +128,18 @@ public class DefaultStateMachineService<S, E> implements StateMachineService<S,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the given machine identifier denotes a known managed state machine.
|
||||
*
|
||||
* @param machineId machine identifier
|
||||
* @return true if machineId denotes a known managed state machine currently in memory
|
||||
*/
|
||||
public boolean hasStateMachine(String machineId) {
|
||||
synchronized (machines) {
|
||||
return machines.containsKey(machineId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the state machine persist.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user