Examples of BlobStore


Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

     */
    @Override
    public Optional<BlobStore> build(
            BlobStoreConfiguration configuration)
            throws Exception {
        BlobStore blobStore = null;

        blobStore = new CloudBlobStore();
        BeanUtils.populate(blobStore, configuration.getConfigMap());
        ((CloudBlobStore) blobStore).init();

View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

     * @throws Exception
     *             the exception
     */
    @Override
    public Optional<BlobStore> build(BlobStoreConfiguration configuration) throws Exception {
        BlobStore blobStore = null;

        DataStore store = getDataStore(configuration);
        if (store != null) {
            blobStore = new DataStoreBlobStore();
            BeanUtils.populate(blobStore, configuration.getConfigMap());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

                Repository[] cluster = new Repository[n];
                kernels = new DocumentMK[cluster.length];
                for (int i = 0; i < cluster.length; i++) {
                    MongoConnection mongo =
                            new MongoConnection(host, port, dbName);
                    BlobStore blobStore = getBlobStore();
                    DocumentMK.Builder mkBuilder = new DocumentMK.Builder().
                            setMongoDB(mongo.getDB()).
                            memoryCacheSize(cacheSize).
                            setClusterId(i).setLogging(false);
                    if (blobStore != null) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

     * @throws Exception
     *             the exception
     */
    public static Optional<BlobStore> create(BlobStoreConfiguration config)
            throws Exception {
        BlobStore blobStore = null;
        BlobStoreBuilder builder = createFactory(config).orNull();

        if ((builder != null) && (config != null)) {
            blobStore = builder.build(config).orNull();
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

        }
    }

    private RecordId internalWriteStream(InputStream stream)
            throws IOException {
        BlobStore blobStore = store.getBlobStore();
        byte[] data = new byte[MAX_SEGMENT_SIZE];
        int n = ByteStreams.read(stream, data, 0, data.length);

        // Special case for short binaries (up to about 16kB):
        // store them directly as small- or medium-sized value records
        if (n < Segment.MEDIUM_LIMIT) {
            return writeValueRecord(n, data);
        } else if (blobStore != null) {
            String blobId = blobStore.writeBlob(new SequenceInputStream(
                    new ByteArrayInputStream(data, 0, n), stream));
            return writeValueRecord(blobId);
        }

        long length = n;
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

    @Override
    @CheckForNull
    public String getReference() {
        String blobId = getBlobId();
        if (blobId != null) {
            BlobStore blobStore = getSegment().getSegmentId().getTracker().
                    getStore().getBlobStore();
            if (blobStore != null) {
                return blobStore.getReference(blobId);
            }else{
                throw new IllegalStateException("Attempt to read external blob with blobId [" + blobId + "] " +
                        "without specifying BlobStore");
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

    public Blob getBlob(@Nonnull String reference) {
        //Use of 'reference' here is bit overloaded. In terms of NodeStore API
        //a blob reference refers to the secure reference obtained from Blob#getReference()
        //However in SegmentStore terminology a blob is referred via 'external reference'
        //That 'external reference' would map to blobId obtained from BlobStore#getBlobId
        BlobStore blobStore = store.getBlobStore();
        if (blobStore != null) {
            String blobId = blobStore.getBlobId(reference);
            if (blobId != null) {
                return store.readBlob(blobId);
            }
            return null;
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

        }
    }

    private RecordId internalWriteStream(InputStream stream)
            throws IOException {
        BlobStore blobStore = store.getBlobStore();
        byte[] data = new byte[MAX_SEGMENT_SIZE];
        int n = ByteStreams.read(stream, data, 0, data.length);

        // Special case for short binaries (up to about 16kB):
        // store them directly as small- or medium-sized value records
        if (n < Segment.MEDIUM_LIMIT) {
            return writeValueRecord(n, data);
        } else if (blobStore != null) {
            String blobId = blobStore.writeBlob(new SequenceInputStream(
                    new ByteArrayInputStream(data, 0, n), stream));
            return writeValueRecord(blobId);
        }

        long length = n;
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.blob.BlobStore

    @Override
    @CheckForNull
    public String getReference() {
        String blobId = getBlobId();
        if (blobId != null) {
            BlobStore blobStore = getSegment().getSegmentId().getTracker().
                    getStore().getBlobStore();
            if (blobStore != null) {
                return blobStore.getReference(blobId);
            }else{
                throw new IllegalStateException("Attempt to read external blob with blobId [" + blobId + "] " +
                        "without specifying BlobStore");
            }
        }
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore

    @Test
    public void testBlobStoreReadWrite() throws InterruptedException {
        if (isBlobStoreLiveConfigured()) {
            createManagedBlobStoreService("aws-s3");
            BlobStore blobStoreService = getOsgiService(BlobStore.class);
            Thread.sleep(DEFAULT_TIMEOUT);

            String featureURL = System.getProperty("jclouds.featureURL");
            System.err.println(executeCommand("jclouds:blobstore-list"));
            System.err.println(executeCommand("jclouds:blobstore-container-create itest-container"));
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.