Beispiel #1
0
        internal String fixForNamespace(String path, bool isSequential)
        {
            if (ensurePathNeeded.get())
            {
                try
                {
                    CuratorZookeeperClient zookeeperClient = client.getZookeeperClient();
                    RetryLoop.callWithRetry
                    (
                        zookeeperClient,
                        CallableUtils.FromFunc <object>(() =>
                    {
                        ZKPaths.mkdirs(zookeeperClient.getZooKeeper(),
                                       ZKPaths.makePath("/", @namespace),
                                       true,
                                       client.getAclProvider(),
                                       true);
                        return(null);
                    })
                    );
                    ensurePathNeeded.set(false);
                }
                catch (Exception e)
                {
                    ThreadUtils.checkInterrupted(e);
                    client.logError("Ensure path threw exception", e);
                }
            }

            return(ZKPaths.fixForNamespace(@namespace, path, isSequential));
        }
 SetACLBuilderImpl(CuratorFrameworkImpl client)
 {
     this.client   = client;
     backgrounding = new Backgrounding();
     acling        = new ACLing(client.getAclProvider());
     version       = -1;
 }
 internal CreateBuilderImpl(CuratorFrameworkImpl client)
 {
     this.client               = client;
     createMode                = CreateMode.PERSISTENT;
     backgrounding             = new Backgrounding();
     acling                    = new ACLing(client.getAclProvider());
     createParentsIfNeeded     = false;
     createParentsAsContainers = false;
     compress                  = false;
     doProtected               = false;
     protectedId               = null;
 }
 public IACLBackgroundPathAndBytesable <String> withACL(List <ACL> aclList)
 {
     acling = new ACLing(client.getAclProvider(), aclList);
     return(new ACLBackgroundPathAndBytesable(this));
 }
 public IBackgroundPathable <Stat> withACL(List <ACL> aclList)
 {
     acling = new ACLing(client.getAclProvider(), aclList);
     return(this);
 }