Package org.jclouds.openstack.swift

Examples of org.jclouds.openstack.swift.CommonSwiftAsyncClient


        if (errors.get() > maxRetries) {
            activeParts.remove(part); // remove part from the bounded-queue without blocking
            latch.countDown();
            return;
        }
        final CommonSwiftAsyncClient client = ablobstore.getContext().unwrap(SwiftApiMetadata.CONTEXT_TOKEN).getAsyncApi();
        Payload chunkedPart = slicer.slice(payload, offset, size);
        logger.debug(String.format("async uploading part %s of %s to container %s", part, key, container));
        final long start = System.currentTimeMillis();
        String blobPartName = blob.getMetadata().getName() + PART_SEPARATOR +
                String.valueOf(part);

        Blob blobPart = ablobstore.blobBuilder(blobPartName).payload(chunkedPart).
                contentDisposition(blobPartName).build();
        final ListenableFuture<String> futureETag = client.putObject(container, blob2Object.apply(blobPart));
        futureETag.addListener(new Runnable() {
            @Override
            public void run() {
                try {
                    etags.put(part, futureETag.get());
View Full Code Here


        if (errors.get() > maxRetries) {
            activeParts.remove(part); // remove part from the bounded-queue without blocking
            latch.countDown();
            return;
        }
        final CommonSwiftAsyncClient client = ablobstore.getContext().unwrap(SwiftApiMetadata.CONTEXT_TOKEN).getAsyncApi();
        Payload chunkedPart = slicer.slice(payload, offset, size);
        logger.debug(String.format("async uploading part %s of %s to container %s", part, key, container));
        final long start = System.currentTimeMillis();
        String blobPartName = blob.getMetadata().getName() + PART_SEPARATOR +
                String.valueOf(part);

        Blob blobPart = ablobstore.blobBuilder(blobPartName).payload(chunkedPart).
                contentDisposition(blobPartName).build();
        final ListenableFuture<String> futureETag = client.putObject(container, blob2Object.apply(blobPart));
        futureETag.addListener(new Runnable() {
            @Override
            public void run() {
                try {
                    etags.put(part, futureETag.get());
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.swift.CommonSwiftAsyncClient

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.