Package net.sf.katta.protocol

Examples of net.sf.katta.protocol.InteractionProtocol.disconnect()


    @Override
    public final void execute(ZkConfiguration zkConf) throws Exception {
      ZkClient zkClient = new ZkClient(zkConf.getZKServers());
      InteractionProtocol protocol = new InteractionProtocol(zkClient, zkConf);
      execute(zkConf, protocol);
      protocol.disconnect();
    }

    protected abstract void execute(ZkConfiguration zkConf, InteractionProtocol protocol) throws Exception;
  }
View Full Code Here


    Thread.sleep(500);
    protocol.setMetric("node1", new MetricsRecord("node1"));
    Thread.sleep(500);
    assertEquals(2, metricLogger.getLoggedRecords());
    protocol.unregisterComponent(metricLogger);
    protocol.disconnect();
  }
}
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.