use of org.apache.helix.mock.participant.MockSchemataModelFactory in project helix by apache.
the class MockParticipantManager method run.
@Override
public void run() {
try {
StateMachineEngine stateMach = getStateMachineEngine();
stateMach.registerStateModelFactory(BuiltInStateModelDefinitions.MasterSlave.name(), _msModelFactory);
stateMach.registerStateModelFactory(BuiltInStateModelDefinitions.LeaderStandby.name(), _lsModelFactory);
stateMach.registerStateModelFactory(BuiltInStateModelDefinitions.OnlineOffline.name(), _ofModelFactory);
MockSchemataModelFactory schemataFactory = new MockSchemataModelFactory();
stateMach.registerStateModelFactory("STORAGE_DEFAULT_SM_SCHEMATA", schemataFactory);
connect();
_startCountDown.countDown();
_stopCountDown.await();
} catch (InterruptedException e) {
String msg = "participant: " + getInstanceName() + ", " + Thread.currentThread().getName() + " is interrupted";
LOG.info(msg);
} catch (Exception e) {
LOG.error("exception running participant-manager", e);
} finally {
_startCountDown.countDown();
disconnect();
_waitStopCompleteCountDown.countDown();
}
}
Aggregations