Package org.apache.activemq.leveldb.replicated.groups

Examples of org.apache.activemq.leveldb.replicated.groups.ZKClient


    protected ZooKeeperPartitionBrokerPlugin plugin() {
        return (ZooKeeperPartitionBrokerPlugin)plugin;
    }

    protected void zkConnect() throws Exception {
        zk_client = new ZKClient(plugin().getZkAddress(), Timespan.parse(plugin().getZkSessionTmeout()), null);
        if( plugin().getZkPassword()!=null ) {
            zk_client.setPassword(plugin().getZkPassword());
        }
        zk_client.start();
        zk_client.waitForConnected(Timespan.parse("30s"));
View Full Code Here


    String zkPath = "/partition-config";

    @Override
    protected void createBrokerCluster(int brokerCount) throws Exception {
        // Store the partitioning in ZK.
        ZKClient zk_client = new ZKClient("localhost:" + connector.getLocalPort(), Timespan.parse("10s"), null);
        try {
            zk_client.start();
            zk_client.waitForConnected(Timespan.parse("30s"));
            try {
                zk_client.delete(zkPath);
            } catch (Throwable e) {
            }
            zk_client.create(zkPath, partitioning.toString(), CreateMode.PERSISTENT);
        } finally {
            zk_client.close();
        }
        super.createBrokerCluster(brokerCount);
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.leveldb.replicated.groups.ZKClient

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.