Examples of FileBlobStore


Examples of org.apache.jackrabbit.mk.blobs.FileBlobStore

        }
        nodeMap = new NodeMap();
        if (name.startsWith("fs:")) {
            String dir = name.substring("fs:".length());
            try {
                ds = new FileBlobStore(dir);
            } catch (IOException e) {
                throw ExceptionFactory.convert(e);
            }
            nodeMap = new NodeMapInDb(dir);
        } else {
View Full Code Here

Examples of org.apache.jackrabbit.mk.blobs.FileBlobStore

        this.rs = rs;
       
        if (pm instanceof BlobStore) {
            bs = (BlobStore) pm;
        } else {
            bs = new FileBlobStore(new File(homeDir, "blobs").getCanonicalPath());
            blobStoreNeedsClose = true;
        }
       
        initialized = true;
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.blobs.FileBlobStore

        }
        nodeMap = new NodeMap();
        if (name.startsWith("fs:")) {
            String dir = name.substring("fs:".length());
            try {
                ds = new FileBlobStore(dir);
            } catch (IOException e) {
                throw ExceptionFactory.convert(e);
            }
            nodeMap = new NodeMapInDb(dir);
        } else {
View Full Code Here

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

        assertEquals(len, data.length);
        return data;
    }

    public static void main(String... args) throws Exception {
        FileBlobStore store = new FileBlobStore("target/temp");

//        DbBlobStore store = new DbBlobStore();
//        store.setConnectionPool(JdbcConnectionPool.create("jdbc:h2:target/test;log=0;undo_log=0", "", ""));

        String id = addFiles(store, "~/temp/ds");
View Full Code Here

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

        this.rs = rs;
       
        if (pm instanceof BlobStore) {
            bs = (BlobStore) pm;
        } else {
            bs = new FileBlobStore(new File(homeDir, "blobs").getCanonicalPath());
            blobStoreNeedsClose = true;
        }
       
        initialized = true;
    }
View Full Code Here

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

        NodeStoreFixture.SegmentFixture segmentFixture = new NodeStoreFixture.SegmentFixture(segmentStore);
        if (segmentFixture.isAvailable()) {
            fixtures.add(new Object[] {segmentFixture});
        }

        FileBlobStore fbs = new FileBlobStore(getTestDir("fbs1").getAbsolutePath());
        fbs.setReferenceKeyPlainText("foobar");
        SegmentStore segmentStoreWithFBS =  new FileStore(fbs, getTestDir("tar2"), 266, true);
        NodeStoreFixture.SegmentFixture segmentFixtureFBS = new NodeStoreFixture.SegmentFixture(segmentStoreWithFBS);
        if (segmentFixtureFBS.isAvailable()) {
            fixtures.add(new Object[] {segmentFixtureFBS});
        }
View Full Code Here

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

            private FileBlobStore fbs;

            @Override
            public BlobStore setUp() {
                storeDir = new File(basedir, unique);
                fbs = new FileBlobStore(storeDir.getAbsolutePath());
                configure(fbs);
                return fbs;
            }

            @Override
View Full Code Here

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

    protected void activate(ComponentContext context, Map<String, Object> config) {
        String homeDir = lookup(context, PROP_HOME);
        if (homeDir != null) {
            log.info("Initializing the FileBlobStore with homeDir [{}]", homeDir);
        }
        BlobStore blobStore = new FileBlobStore(FilenameUtils.concat(homeDir,"datastore"));
        PropertiesUtil.populate(blobStore, config, false);
        reg = context.getBundleContext().registerService(new String[]{
                BlobStore.class.getName(),
                GarbageCollectableBlobStore.class.getName()
        }, blobStore, null);
View Full Code Here

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

        assertEquals(len, data.length);
        return data;
    }

    public static void main(String... args) throws Exception {
        FileBlobStore store = new FileBlobStore("target/temp");

//        DbBlobStore store = new DbBlobStore();
//        store.setConnectionPool(JdbcConnectionPool.create("jdbc:h2:target/test;log=0;undo_log=0", "", ""));

        String id = addFiles(store, "~/temp/ds");
View Full Code Here

Examples of org.geowebcache.storage.blobstore.file.FileBlobStore

public class BlobStoreTest extends TestCase {
    public static final String TEST_BLOB_DIR_NAME = "gwcTestBlobs";

    public void testTile() throws Exception {
        FileBlobStore fbs = setup();

        Resource bytes = new ByteArrayResource("1 2 3 4 5 6 test".getBytes());
        long[] xyz = { 1L, 2L, 3L };
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put("a", "x");
        parameters.put("b", "ø");
        TileObject to = TileObject.createCompleteTileObject("test:123123 112", xyz, "EPSG:4326",
                "image/jpeg", parameters, bytes);
        to.setId(11231231);

        fbs.put(to);

        TileObject to2 = TileObject.createQueryTileObject("test:123123 112", xyz, "EPSG:4326",
                "image/jpeg", parameters);
        to2.setId(11231231);

        Resource resp = fbs.get(to2);

        to2.setBlob(resp);

        assertEquals(to.getBlobFormat(), to2.getBlobFormat());
        InputStream is = to.getBlob().getInputStream();
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.