use of org.apache.helix.mock.participant.DummyProcess.DummyLeaderStandbyStateModelFactory in project helix by apache.
the class DummyProcessThread method run.
@Override
public void run() {
try {
DummyStateModelFactory stateModelFactory = new DummyStateModelFactory(0);
StateMachineEngine stateMach = _manager.getStateMachineEngine();
stateMach.registerStateModelFactory("MasterSlave", stateModelFactory);
DummyLeaderStandbyStateModelFactory stateModelFactory1 = new DummyLeaderStandbyStateModelFactory(10);
DummyOnlineOfflineStateModelFactory stateModelFactory2 = new DummyOnlineOfflineStateModelFactory(10);
stateMach.registerStateModelFactory("LeaderStandby", stateModelFactory1);
stateMach.registerStateModelFactory("OnlineOffline", stateModelFactory2);
_manager.connect();
Thread.currentThread().join();
} catch (InterruptedException e) {
String msg = "participant:" + _instanceName + ", " + Thread.currentThread().getName() + " interrupted";
LOG.info(msg);
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations