Package org.voltcore.zk.ZKUtil

Examples of org.voltcore.zk.ZKUtil.ChildrenCallback


        HashSet<Integer> existingPartitions = new HashSet<Integer>(initiatorLeaders.keySet());
        List<String> partitions = zk.getChildren(VoltZK.leaders_initiators, partitionWatcher);
        Map<Integer, ChildrenCallback> callbacks = new HashMap<Integer, ChildrenCallback>();
        for (String partitionString : partitions) {
            int partition = LeaderElector.getPartitionFromElectionDir(partitionString);
            ChildrenCallback cb = new ChildrenCallback();

            if (!existingPartitions.contains(partition)) {
                String path = ZKUtil.joinZKPath(VoltZK.leaders_initiators, partitionString);
                zk.getChildren(path, new LeaderWatcher(partition, path), cb, null);
                callbacks.put(partition, cb);
View Full Code Here


        }
    }

    private void watchInitiatorLeader(int partition, String path)
    throws KeeperException, InterruptedException {
        ChildrenCallback cb = new ChildrenCallback();
        zk.getChildren(path, new LeaderWatcher(partition, path), cb, null);
        processInitiatorLeader(partition, cb);
    }
View Full Code Here

TOP

Related Classes of org.voltcore.zk.ZKUtil.ChildrenCallback

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.