Examples of registerStateModelFactory()


Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

          new DummyOnlineOfflineStateModelFactory(10);
      stateMach.registerStateModelFactory("LeaderStandby", lsModelFactory);
      stateMach.registerStateModelFactory("OnlineOffline", ofModelFactory);

      MockSchemataModelFactory schemataFactory = new MockSchemataModelFactory();
      stateMach.registerStateModelFactory("STORAGE_DEFAULT_SM_SCHEMATA", schemataFactory);

      connect();
      _startCountDown.countDown();

      _stopCountDown.await();
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

  public void run() {
    try {
      StateMachineEngine stateMach = getStateMachineEngine();
      DistClusterControllerStateModelFactory lsModelFactory =
          new DistClusterControllerStateModelFactory(_zkAddress);
      stateMach.registerStateModelFactory("LeaderStandby", lsModelFactory);

      connect();
      _startCountDown.countDown();
      _stopCountDown.await();
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

        void registerNotifier()
        {
            StateMachineEngine stateMach = _manager.getStateMachineEngine();
            DatabusClusterNotifierFactory modelFactory = new DatabusClusterNotifierFactory(
                    _notifier);
            stateMach.registerStateModelFactory(DEFAULT_STATE_MODEL,
                    modelFactory);
        }

        public boolean join()
        {
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

      String instanceName = "localhost_" + (START_PORT + i);
      _participants[i] = new MockParticipant(_zkaddr, CLUSTER_NAME, instanceName);

      // Register a Task state model factory.
      StateMachineEngine stateMachine = _participants[i].getStateMachineEngine();
      stateMachine.registerStateModelFactory(StateModelDefId.from("Task"),
          new TaskStateModelFactory(_participants[i], taskFactoryReg));

      _participants[i].syncStart();
    }
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

      String instanceName = "localhost_" + (START_PORT + i);
      _participants[i] = new MockParticipant(_zkaddr, CLUSTER_NAME, instanceName);

      // Register a Task state model factory.
      StateMachineEngine stateMachine = _participants[i].getStateMachineEngine();
      stateMachine.registerStateModelFactory(StateModelDefId.from("Task"),
          new TaskStateModelFactory(_participants[i], taskFactoryReg));
      _participants[i].syncStart();
    }

    // start controller
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

      _participants[i] = new MockParticipant(_zkaddr, CLUSTER_NAME, instanceName);

      // Register a Task state model factory.
      StateMachineEngine stateMachine = _participants[i].getStateMachineEngine();
      stateMachine.registerStateModelFactory(StateModelDefId.from("Task"),
          new TaskStateModelFactory(_participants[i], taskFactoryReg));
      _participants[i].syncStart();
    }

    // Start controller
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

    } else if ("LeaderStandby".equalsIgnoreCase(stateModelType)) {
      stateModelFactory = new LeaderStandbyStateModelFactory(delay);
    }

    StateMachineEngine stateMach = manager.getStateMachineEngine();
    stateMach.registerStateModelFactory(StateModelDefId.from(stateModelType), stateModelFactory);
    manager.connect();
    manager.getMessagingService().registerMessageHandlerFactory(
        MessageType.STATE_TRANSITION.toString(), stateMach);
  }
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

        MultiClusterControllerTransitionHandlerFactory stateModelFactory =
            new MultiClusterControllerTransitionHandlerFactory(zkConnectString);

        StateMachineEngine stateMach = manager.getStateMachineEngine();
        stateMach.registerStateModelFactory(StateModelDefId.LeaderStandby, stateModelFactory);
        manager.connect();
      } else {
        logger.error("cluster controller mode:" + controllerMode + " NOT supported");
      }
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

      MasterSlaveStateModelFactory stateModelFactory =
          new MasterSlaveStateModelFactory(instanceName);

      StateMachineEngine stateMach = manager.getStateMachineEngine();
      stateMach.registerStateModelFactory(STATE_MODEL_NAME, stateModelFactory);
      manager.connect();
    }

    public void stop() {
      manager.disconnect();
View Full Code Here

Examples of org.apache.helix.participant.StateMachineEngine.registerStateModelFactory()

              InstanceType.PARTICIPANT, _zkAddr);

      StateMachineEngine stateMach = _manager.getStateMachineEngine();
      ConsumerStateTransitionHandlerFactory transitionHandlerFactory =
          new ConsumerStateTransitionHandlerFactory(_consumerId, _mqServer);
      stateMach.registerStateModelFactory(
          StateModelDefId.from(SetupConsumerCluster.DEFAULT_STATE_MODEL), transitionHandlerFactory);

      _manager.connect();

      Thread.currentThread().join();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.