Examples of DirectorySubspace


Examples of com.foundationdb.directory.DirectorySubspace

    private byte[] generate(List<String> path) {
        // Directory should always hand out unique prefixes.
        // So use createOrOpen() and do not pass to wrapped for unique check as AISValidation confirms
        try {
            Transaction txn = this.txn.getTransaction();
            DirectorySubspace indexDir = directory.createOrOpen(txn, path).get();
            return indexDir.pack();
        } catch (RuntimeException e) {
            throw FDBAdapter.wrapFDBException(this.txn.session, e);
        }
    }
View Full Code Here

Examples of com.foundationdb.directory.DirectorySubspace

    public void scanBounds() {
        final byte[] testBytes = generateBytes(4096);
        fdbHolder().getDatabase().run(new Function<Transaction, Void>() {
            @Override
            public Void apply(Transaction tr) {
                DirectorySubspace dir = getDir(tr);
                byte[] beforePrefix = ByteArrayUtil.join(dir.pack(), new byte[] { 0x41 });
                byte[] blobPrefix = ByteArrayUtil.join(dir.pack(), new byte[] { 0x42 });
                byte[] afterPrefix = ByteArrayUtil.join(dir.pack(), new byte[] { 0x43 });

                tr.set(beforePrefix, beforePrefix);
                tr.set(afterPrefix, afterPrefix);

                BlobAsync blob = new BlobAsync(new Subspace(blobPrefix));
View Full Code Here

Examples of com.foundationdb.directory.DirectorySubspace

            }
        });
    }

    private DirectorySubspace getDir(Transaction tr) {
        DirectorySubspace dir = fdbHolder().getRootDirectory().createOrOpen(tr, PathUtil.from("blob_test")).get();
        tr.clear(dir.range());
        return dir;
    }
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.