Fix zk ensemble join and start
- Now checking during a start if curator client is already started, if so handle join manually. Also trying to start client manually. - Fixes #187
This commit is contained in:
@@ -197,11 +197,11 @@ public class StateMachineConfig {
|
||||
}
|
||||
|
||||
public enum States {
|
||||
S0, S1, S11, S12, S2, S21, S211, S212
|
||||
S0, S1, S11, S12, S2, S21, S211, S212
|
||||
}
|
||||
|
||||
public enum Events {
|
||||
A, B, C, D, E, F, G, H, I, J, K
|
||||
A, B, C, D, E, F, G, H, I, J, K
|
||||
}
|
||||
|
||||
private static class FooAction implements Action<States, Events> {
|
||||
|
||||
@@ -134,6 +134,11 @@ public class ZookeeperStateMachineEnsemble<S, E> extends StateMachineEnsembleObj
|
||||
}
|
||||
}
|
||||
curatorClient.getConnectionStateListenable().addListener(connectionListener);
|
||||
if (curatorClient.getState() == CuratorFrameworkState.STARTED) {
|
||||
handleZkConnect();
|
||||
} else {
|
||||
curatorClient.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user