Package com.foundationdb.blob

Examples of com.foundationdb.blob.BlobAsync


        for(String subDirName : dir.list(txn.getTransaction()).get()) {
            if((skip != null) && skip.contains(subDirName)) {
                continue;
            }
            Subspace subDir = dir.open(txn.getTransaction(), PathUtil.from(subDirName)).get();
            BlobAsync blob = new BlobAsync(subDir);
            byte[] data = blob.read(txn.getTransaction()).get();
            if(data != null) {
                ByteBuffer buffer = ByteBuffer.wrap(data);
                reader.loadBuffer(buffer);
            }
        }
View Full Code Here


            if((buffer.position() == 0) && (buffer.limit() == buffer.capacity())) {
                newValue = buffer.array();
            } else {
                newValue = Arrays.copyOfRange(buffer.array(), buffer.position(), buffer.limit());
            }
            BlobAsync blob = new BlobAsync(blobDir);
            blob.truncate(txn.getTransaction(), 0).get();
            blob.write(txn.getTransaction(), 0, newValue).get();
        } else {
            dir.removeIfExists(txn.getTransaction(), PathUtil.from(schema)).get();
        }
        return buffer;
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.blob.BlobAsync

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.