Examples of onExternalViewChange()


Examples of com.linkedin.helix.ExternalViewChangeListener.onExternalViewChange()

      } else if (_changeType == EXTERNAL_VIEW)
      {
        ExternalViewChangeListener externalViewListener = (ExternalViewChangeListener) _listener;
        subscribeForChanges(changeContext, true, true);
        List<ExternalView> externalViewList = _accessor.getChildValues(keyBuilder.externalViews());
        externalViewListener.onExternalViewChange(externalViewList, changeContext);
      } else if (_changeType == ChangeType.CONTROLLER)
      {
        ControllerChangeListener controllerChangelistener = (ControllerChangeListener) _listener;
        subscribeForChanges(changeContext, true, false);
        controllerChangelistener.onControllerChange(changeContext);
View Full Code Here

Examples of com.linkedin.helix.ExternalViewChangeListener.onExternalViewChange()

            (ExternalViewChangeListener) _listener;
        subscribeForChanges(changeContext, _path, true, true);
        List<ExternalView> externalViewList =
            _accessor.getChildValues(keyBuilder.externalViews());

        externalViewListener.onExternalViewChange(externalViewList, changeContext);
      }
      else if (_changeType == ChangeType.CONTROLLER)
      {
        ControllerChangeListener controllerChangelistener =
            (ControllerChangeListener) _listener;
View Full Code Here

Examples of com.linkedin.helix.ExternalViewChangeListener.onExternalViewChange()

            (ExternalViewChangeListener) _listener;
        subscribeForChanges(changeContext, _path, true, true);
        List<ExternalView> externalViewList =
            _accessor.getChildValues(_propertyKey);

        externalViewListener.onExternalViewChange(externalViewList, changeContext);
        break;
      }
      case CONTROLLER:
      {
        ControllerChangeListener controllerChangelistener =
View Full Code Here

Examples of com.linkedin.helix.monitoring.mbeans.ClusterStatusMonitor.onExternalViewChange()

      // Update cluster status monitor mbean
      ClusterStatusMonitor clusterStatusMonitor =
          (ClusterStatusMonitor) event.getAttribute("clusterStatusMonitor");
      if (clusterStatusMonitor != null)
      {
        clusterStatusMonitor.onExternalViewChange(view,
                                                  cache._idealStateMap.get(view.getResourceName()));
      }
     
      // compare the new external view with current one, set only on different
      Map<String, ExternalView> curExtViews =
View Full Code Here

Examples of com.linkedin.helix.monitoring.mbeans.ClusterStatusMonitor.onExternalViewChange()

      // Update cluster status monitor mbean
      ClusterStatusMonitor clusterStatusMonitor =
          (ClusterStatusMonitor) event.getAttribute("clusterStatusMonitor");
      if (clusterStatusMonitor != null)
      {
        clusterStatusMonitor.onExternalViewChange(view,
                                                  cache._idealStateMap.get(view.getResourceName()));
      }
     
      // compare the new external view with current one, set only on different
      Map<String, ExternalView> curExtViews =
View Full Code Here

Examples of com.linkedin.helix.spectator.RoutingTableProvider.onExternalViewChange()

  @Test()
  public void testNullAndEmpty()
  {

    RoutingTableProvider routingTable = new RoutingTableProvider();
    routingTable.onExternalViewChange(null, changeContext);
    List<ExternalView> list = Collections.emptyList();
    routingTable.onExternalViewChange(list, changeContext);

  }
View Full Code Here

Examples of com.linkedin.helix.spectator.RoutingTableProvider.onExternalViewChange()

  {

    RoutingTableProvider routingTable = new RoutingTableProvider();
    routingTable.onExternalViewChange(null, changeContext);
    List<ExternalView> list = Collections.emptyList();
    routingTable.onExternalViewChange(list, changeContext);

  }

  @Test()
  public void testSimple()
View Full Code Here

Examples of com.linkedin.helix.spectator.RoutingTableProvider.onExternalViewChange()

    // one master
    add(record, "TESTDB_0", "localhost_8900", "MASTER");
    List<ExternalView> externalViewList = new ArrayList<ExternalView>();
    externalViewList.add(new ExternalView(record));
    routingTable.onExternalViewChange(externalViewList, changeContext);

    instances = routingTable.getInstances("TESTDB", "TESTDB_0", "MASTER");
    AssertJUnit.assertNotNull(instances);
    AssertJUnit.assertEquals(instances.size(), 1);
View Full Code Here

Examples of com.linkedin.helix.spectator.RoutingTableProvider.onExternalViewChange()

    add(record, "TESTDB_0", "localhost_8901", "MASTER");
    add(record, "TESTDB_1", "localhost_8900", "SLAVE");

    externalViewList = new ArrayList<ExternalView>();
    externalViewList.add(new ExternalView(record));
    routingTable.onExternalViewChange(externalViewList, changeContext);
    instances = routingTable.getInstances("TESTDB", "TESTDB_0", "MASTER");
    AssertJUnit.assertNotNull(instances);
    AssertJUnit.assertEquals(instances.size(), 2);

    instances = routingTable.getInstances("TESTDB", "TESTDB_1", "SLAVE");
View Full Code Here

Examples of com.linkedin.helix.spectator.RoutingTableProvider.onExternalViewChange()

    // updates
    add(record, "TESTDB_0", "localhost_8901", "SLAVE");
    externalViewList = new ArrayList<ExternalView>();
    externalViewList.add(new ExternalView(record));
    routingTable.onExternalViewChange(externalViewList, changeContext);
    instances = routingTable.getInstances("TESTDB", "TESTDB_0", "SLAVE");
    AssertJUnit.assertNotNull(instances);
    AssertJUnit.assertEquals(instances.size(), 1);
  }
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.