@Override public AsyncBlobStore getAsyncBlobStore() { return delegate().getAsyncBlobStore(); }
@Override public AsyncBlobStore getAsyncBlobStore() { return delegate().getAsyncBlobStore(); }
/** * This implementation invokes {@link CommonSwiftClient#putObject} * * @param container * container name * @param blob * object */ @Override public String putBlob(String container, Blob blob) { createParentIfNeededAsync(context.getAsyncBlobStore(), container, blob); return sync.putObject(container, blob2Object.apply(blob)); }
/** * This implementation invokes {@link CommonSwiftClient#putObject} * * @param container * container name * @param blob * object */ @Override public String putBlob(String container, Blob blob) { createParentIfNeededAsync(context.getAsyncBlobStore(), container, blob); return sync.putObject(container, blob2Object.apply(blob)); }
/** * This implementation invokes {@link CommonSwiftClient#putObject} * * @param container * container name * @param blob * object */ @Override public String putBlob(String container, Blob blob) { createParentIfNeededAsync(context.getAsyncBlobStore(), container, blob); return sync.putObject(container, blob2Object.apply(blob)); }
long start = System.currentTimeMillis(); AsyncBlobStore blobStore = context.getAsyncBlobStore(); // it can be changed to sync
for (int i = 0; i < 10; i++) { responses.put(i, Futures.transform(view.getAsyncBlobStore().getBlob(container, name), new Function<Blob, Void>() {
public void testMultipartAsynchronouslySmallBlob() throws IOException, InterruptedException, Exception { String containerName = getContainerName(); try { AsyncBlobStore asyncBlobStore = view.getAsyncBlobStore(); asyncBlobStore.createContainerInLocation(null, containerName).get(); Blob blob = asyncBlobStore.blobBuilder("small").payload("small").build(); asyncBlobStore.putBlob(containerName, blob, PutOptions.Builder.multipart()).get(); } finally { returnContainer(containerName); } }