Package org.akubraproject.mem

Examples of org.akubraproject.mem.MemBlobStore


  public Object[] createTests() throws Exception {
    URI storeId1 = URI.create("urn:mux-tck-test:42");
    URI storeId2 = URI.create("urn:mux-tck-test:43");

    List<? extends BlobStore> nonTxnStores = Arrays.asList(
            new MemBlobStore(URI.create("urn:store:1")),
            new MemBlobStore(URI.create("urn:store:2"))
    );
    List<? extends BlobStore> txnStores = Arrays.asList(
            createTxnStore("mux-txn-text-1", new MemBlobStore(URI.create("urn:store:5"))),
            createTxnStore("mux-txn-text-2", new MemBlobStore(URI.create("urn:store:6")))
    );

    return new Object[] {
      new MuxStoreTestSuite(createMuxStore(storeId1, nonTxnStores), storeId1, false, true),
      new MuxStoreTestSuite(createMuxStore(storeId2, txnStores), storeId2, true, false),
View Full Code Here


  /**
   * Set things up for all tests.
   */
  @BeforeSuite
  public void setUp() throws Exception {
    store1   = new MemBlobStore(URI.create("urn:store:1"));
    store2   = new MemBlobStore(URI.create("urn:store:2"));

    store =
      new AbstractMuxStore(URI.create("urn:store")) {
          @Override
          public BlobStoreConnection openConnection(Transaction tx, Map<String, String> hints)
View Full Code Here

    FileUtils.deleteDirectory(dbDir);
    dbDir.getParentFile().mkdirs();

    File base = new File(System.getProperty("basedir"), "target");
    System.setProperty("derby.stream.error.file", new File(base, "derby.log").toString());
    return new TransactionalStore(getStoreId(), new MemBlobStore(), dbDir.getAbsolutePath());
  }
View Full Code Here

  public IdMappingBlobStoreTCKTest() {
    super(getTestStore(), testStoreId, false, true);
  }

  private static BlobStore getTestStore() {
    return new IdMappingBlobStore(testStoreId, new MemBlobStore(), new MockIdMapper());
  }
View Full Code Here

  }

  private static BlobStoreConnection getTestConnection(boolean prefixMappable)
      throws Exception {
    BlobStore store = new IdMappingBlobStore(URI.create("urn:test-store"),
        new MemBlobStore(), new MockIdMapper("internal:", prefixMappable));
    return store.openConnection(null, null);
  }
View Full Code Here

  private static Blob getTestBlob(URI blobId,
                                  boolean delegateCanCanonicalize)
      throws Exception {
    IdMapper mapper = new MockIdMapper();
    BlobStore store = new IdMappingBlobStore(URI.create("urn:test-store"),
        new MemBlobStore(), mapper);
    BlobStoreConnection connection = store.openConnection(null, null);
    Blob delegate = connection.getBlob(blobId, null);
    OutputStream out = delegate.openOutputStream(-1, false);
    IOUtils.copy(new StringReader(blobId.toString()), out);
    out.close();
View Full Code Here


    private static AkubraLowlevelStorage getInstance(
            boolean forceSafeObjectOverwrites,
            boolean forceSafeDatastreamOverwrites) {
        return new AkubraLowlevelStorage(new MemBlobStore(),
                                         new MemBlobStore(),
                                         forceSafeObjectOverwrites,
                                         forceSafeDatastreamOverwrites);
    }
View Full Code Here

TOP

Related Classes of org.akubraproject.mem.MemBlobStore

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.