Package net.sf.katta.protocol

Examples of net.sf.katta.protocol.IAddRemoveListener


    if (isDone()) {
      return;
    }

    InteractionProtocol protocol = _context.getProtocol();
    protocol.registerChildListener(this, PathDef.NODES_LIVE, new IAddRemoveListener() {
      @Override
      public void removed(String name) {
        checkDeploymentForCompletion();
      }
View Full Code Here


  public MetricLogger(OutputType outputType, InteractionProtocol protocol) {
    _protocol = protocol;
    _outputType = outputType;
    _protocol.registerComponent(this);
    List<String> children = _protocol.registerChildListener(this, PathDef.NODE_METRICS, new IAddRemoveListener() {
      @Override
      public void removed(String name) {
        unsubscribeDataUpdates(name);
      }
View Full Code Here

    _selectionPolicy = policy;
    _protocol = protocol;
    _clientConfiguration = clientConfiguration;
    _maxTryCount = _clientConfiguration.getInt(ClientConfiguration.CLIENT_NODE_INTERACTION_MAXTRYCOUNT);

    List<String> indexList = _protocol.registerChildListener(this, PathDef.INDICES_METADATA, new IAddRemoveListener() {
      @Override
      public void removed(String name) {
        removeIndex(name);
      }
View Full Code Here

    for (Shard shard : shards) {
      shardNames.add(shard.getName());
    }
    for (final String shardName : shardNames) {
      List<String> nodes = _protocol.registerChildListener(this, PathDef.SHARD_TO_NODES, shardName,
              new IAddRemoveListener() {
                @Override
                public void removed(String nodeName) {
                  LOG.info("shard '" + shardName + "' removed from node " + nodeName + "'");
                  Collection<String> shardNodes = new ArrayList<String>(_selectionPolicy.getShardNodes(shardName));
                  shardNodes.remove(nodeName);
View Full Code Here

    becomePrimaryOrSecondaryMaster();
  }

  private void startNodeManagement() {
    LOG.info("start managing nodes...");
    List<String> nodes = _protocol.registerChildListener(this, PathDef.NODES_LIVE, new IAddRemoveListener() {
      @Override
      public void removed(String name) {
        synchronized (Master.this) {
          if (!isInSafeMode()) {
            _protocol.addMasterOperation(new CheckIndicesOperation());
View Full Code Here

TOP

Related Classes of net.sf.katta.protocol.IAddRemoveListener

Copyright © 2018 www.massapicom. 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.