Examples of addCurrentStateChangeListener()


Examples of com.linkedin.helix.HelixManager.addCurrentStateChangeListener()

  for (String session : curSessions.keySet()) {
    if (lastSessions == null || !lastSessions.containsKey(session)) {
        String instanceName = curSessions.get(session).getInstanceName();
          try {
            // add current-state listeners for new sessions
          manager.addCurrentStateChangeListener(this, instanceName, session);
          LOG.info("Succeed in addling current state listener for instance: " + instanceName + " with session: " + session);

          } catch (Exception e) {
            LOG.error("Fail to add current state listener for instance: "
              + instanceName + " with session: " + session, e);
View Full Code Here

Examples of com.linkedin.helix.HelixManager.addCurrentStateChangeListener()

      // that we've added a currentState listener
      if (!_instanceCurrentStateChangeSubscriptionSessionIds.contains(clientSessionId))
      {
        try
        {
          manager.addCurrentStateChangeListener(this, instanceName, clientSessionId);
          _instanceCurrentStateChangeSubscriptionSessionIds.add(clientSessionId);
          logger.info("Observing client session id: " + clientSessionId);
        }
        catch (Exception e)
        {
View Full Code Here

Examples of com.linkedin.helix.manager.file.StaticFileHelixManager.addCurrentStateChangeListener()

    AssertJUnit.assertTrue(exceptionCaught);

    exceptionCaught = false;
    try
    {
      controller.addCurrentStateChangeListener(controllerListener, "localhost_8900", sessionId);
    } catch (UnsupportedOperationException e)
    {
      exceptionCaught = true;
    }
    AssertJUnit.assertTrue(exceptionCaught);
View Full Code Here

Examples of org.apache.helix.HelixManager.addCurrentStateChangeListener()

      // that we've added a currentState listener
      if (!_instanceCurrentStateChangeSubscriptionSessionIds.contains(clientSessionId))
      {
        try
        {
          manager.addCurrentStateChangeListener(this, instanceName, clientSessionId);
          _instanceCurrentStateChangeSubscriptionSessionIds.add(clientSessionId);
          logger.info("Observing client session id: " + clientSessionId);
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.apache.helix.HelixManager.addCurrentStateChangeListener()

    TestZKCallback test = new TestZKCallback();

    TestZKCallback.TestCallbackListener testListener = test.new TestCallbackListener();

    testHelixManager.addMessageListener(testListener, "localhost_8900");
    testHelixManager.addCurrentStateChangeListener(testListener, "localhost_8900",
        testHelixManager.getSessionId());
    testHelixManager.addConfigChangeListener(testListener);
    testHelixManager.addIdealStateChangeListener(testListener);
    testHelixManager.addExternalViewChangeListener(testListener);
    testHelixManager.addLiveInstanceChangeListener(testListener);
View Full Code Here

Examples of org.apache.helix.HelixManager.addCurrentStateChangeListener()

    for (String session : curSessions.keySet()) {
      if (lastSessions == null || !lastSessions.containsKey(session)) {
        String instanceName = curSessions.get(session).getInstanceName();
        try {
          // add current-state listeners for new sessions
          manager.addCurrentStateChangeListener(this, instanceName, session);
          logger.info(manager.getInstanceName() + " added current-state listener for instance: "
              + instanceName + ", session: " + session + ", listener: " + this);
        } catch (Exception e) {
          logger.error("Fail to add current state listener for instance: " + instanceName
              + " with session: " + session, e);
View Full Code Here

Examples of org.apache.helix.HelixManager.addCurrentStateChangeListener()

    for (String session : curSessions.keySet()) {
      if (lastSessions == null || !lastSessions.containsKey(session)) {
        String instanceName = curSessions.get(session).getInstanceName();
        try {
          // add current-state listeners for new sessions
          manager.addCurrentStateChangeListener(this, instanceName, session);
          logger.info(manager.getInstanceName() + " added current-state listener for instance: "
              + instanceName + ", session: " + session + ", listener: " + this);
        } catch (Exception e) {
          logger.error("Fail to add current state listener for instance: " + instanceName
              + " with session: " + session, e);
View Full Code Here

Examples of org.apache.helix.HelixManager.addCurrentStateChangeListener()

    TestZKCallback test = new TestZKCallback();

    TestZKCallback.TestCallbackListener testListener = test.new TestCallbackListener();

    testHelixManager.addMessageListener(testListener, "localhost_8900");
    testHelixManager.addCurrentStateChangeListener(testListener, "localhost_8900",
        testHelixManager.getSessionId());
    testHelixManager.addConfigChangeListener(testListener);
    testHelixManager.addIdealStateChangeListener(testListener);
    testHelixManager.addExternalViewChangeListener(testListener);
    testHelixManager.addLiveInstanceChangeListener(testListener);
View Full Code Here

Examples of org.apache.helix.HelixManager.addCurrentStateChangeListener()

      if (lastSessions == null || !lastSessions.containsKey(session)) {
        String instanceName = curSessions.get(session).getInstanceName();
        SessionId sessionId = curSessions.get(session).getTypedSessionId();
        try {
          // add current-state listeners for new sessions
          manager.addCurrentStateChangeListener(this, instanceName, sessionId.toString());
          logger.info(manager.getInstanceName() + " added current-state listener for instance: "
              + instanceName + ", session: " + session + ", listener: " + this);
        } catch (Exception e) {
          logger.error("Fail to add current state listener for instance: " + instanceName
              + " with session: " + session, e);
View Full Code Here

Examples of org.apache.helix.HelixManager.addCurrentStateChangeListener()

    for (String session : curSessions.keySet()) {
      if (lastSessions == null || !lastSessions.containsKey(session)) {
        String instanceName = curSessions.get(session).getInstanceName();
        try {
          // add current-state listeners for new sessions
          manager.addCurrentStateChangeListener(this, instanceName, session);
          logger.info(manager.getInstanceName() + " added current-state listener for instance: "
              + instanceName + ", session: " + session + ", listener: " + this);
        } catch (Exception e) {
          logger.error("Fail to add current state listener for instance: " + instanceName
              + " with session: " + session, e);
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.