Package org.menagerie

Examples of org.menagerie.ZkCommandExecutor.execute()


        zk = newZooKeeper();

        //be sure that the lock-place is created
        try{
            ZkCommandExecutor zkCommandExecutor = new ZkCommandExecutor(new BaseZkSessionManager(zk));
            zkCommandExecutor.execute(new ZkCommand<Void>() {
                @Override
                public Void execute(ZooKeeper zk) throws KeeperException, InterruptedException {
                    zk.create(barrierPath,new byte[]{}, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
                    return null;
                }
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.