Package com.microsoft.windowsazure.core.pipeline.jersey

Examples of com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy


        LocatorInfo locator = createLocator(policy, asset, 5);

        blobWriter = service.createBlobWriter(locator);

        ExponentialRetryPolicy retryPolicy = new ExponentialRetryPolicy(5000,
                5, new int[] { 400, 404 });
        blobWriter = blobWriter.withFilter(new RetryPolicyFilter(retryPolicy));
    }
View Full Code Here


    public void canUploadBlockBlobWithExplicitRetry() throws Exception {
        InputStream blobContent = new ByteArrayInputStream(firstPrimes);
        blobWriter.createBlockBlob("canUploadBlockBlobWithExplicitRetry1",
                blobContent);

        ExponentialRetryPolicy forceRetryPolicy = new ExponentialRetryPolicy(1,
                1, new int[] { 201 });
        WritableBlobContainerContract forceRetryBlobWriter = blobWriter
                .withFilter(new RetryPolicyFilter(forceRetryPolicy));

        blobContent.reset();
View Full Code Here

        Configuration config = createConfiguration();
        BlobContract service = BlobService.create(config);

        // Act
        service = service.withFilter(new RetryPolicyFilter(
                new ExponentialRetryPolicy(100/* deltaBackoff */,
                        3/* maximumAttempts */, new int[] { 400, 500, 503 })));

        Exception error = null;
        try {
            String content = "foo";
View Full Code Here

        Configuration config = createConfiguration();
        BlobContract service = BlobService.create(config);

        // Act
        service = service.withFilter(new RetryPolicyFilter(
                new ExponentialRetryPolicy(100/* deltaBackoff */,
                        3/* maximumAttempts */, new int[] { 403 })));

        ServiceException error = null;
        ResetableInputStream stream = null;
        try {
View Full Code Here

        double duration = 1;
        EnumSet<AccessPolicyPermission> write = EnumSet
                .of(AccessPolicyPermission.WRITE);
        service.create(AccessPolicy.create(name + "1", duration, write));

        ExponentialRetryPolicy forceRetryPolicy = new ExponentialRetryPolicy(1,
                1, new int[] { 201 });
        MediaContract forceRetryService = service
                .withFilter(new RetryPolicyFilter(forceRetryPolicy));

        forceRetryService.create(AccessPolicy.create(name + "2", duration,
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy

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.