예제 #1
0
        public Stat forPath(String path)
        {
            path = client.fixForNamespace(path);

            Stat resultStat = null;

            if (backgrounding.inBackground())
            {
                client.processBackgroundOperation(new OperationAndData <String>(this, path, backgrounding.getCallback(), null, backgrounding.getContext()), null);
            }
            else
            {
                resultStat = pathInForeground(path);
            }
            return(resultStat);
        }
예제 #2
0
        public Stat forPath(String path, byte[] data)
        {
            if (compress)
            {
                data = client.getCompressionProvider().compress(path, data);
            }

            path = client.fixForNamespace(path);

            Stat resultStat = null;

            if (backgrounding.inBackground())
            {
                client.processBackgroundOperation(new OperationAndData <PathAndBytes>(this, new PathAndBytes(path, data), backgrounding.getCallback(), null, backgrounding.getContext()), null);
            }
            else
            {
                resultStat = pathInForeground(path, data);
            }
            return(resultStat);
        }
예제 #3
0
        public String forPath(String givenPath, byte[] data)
        {
            if (compress)
            {
                data = client.getCompressionProvider().compress(givenPath, data);
            }

            String adjustedPath = adjustPath(client.fixForNamespace(givenPath, createMode.isSequential()));

            String returnPath = null;

            if (backgrounding.inBackground())
            {
                pathInBackground(adjustedPath, data, givenPath);
            }
            else
            {
                String path = protectedPathInForeground(adjustedPath, data);
                returnPath = client.unfixForNamespace(path);
            }
            return(returnPath);
        }