ServiceTimeoutPolicy Class

  • java.lang.Object
    • com.azure.storage.common.policy.ServiceTimeoutPolicy

Implements

public final class ServiceTimeoutPolicy
implements HttpPipelinePolicy

Pipeline policy that sets the timeout URI query parameter to cancel requests on the service side if the server timeout interval elapses before the service has finished processing the request. For more information on timeouts for different services, see here: Setting timeouts for blob service operations Setting timeouts for file service operations Setting timeouts for queue service operations

Constructor Summary

Constructor Description
ServiceTimeoutPolicy(Duration timeout)

Creates a service timeout policy.

Method Summary

Modifier and Type Method and Description
HttpPipelinePosition getPipelinePosition()

Gets the position to place the policy.

Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)
HttpResponse processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next)

Methods inherited from java.lang.Object

Constructor Details

ServiceTimeoutPolicy

public ServiceTimeoutPolicy(Duration timeout)

Creates a service timeout policy.

The maximum timeout interval for Blob service operations is 30 seconds, with exceptions for certain operations. The default value is also 30 seconds, although some read and write operations may use a larger default. Apart from these exceptions, the service automatically reduces any timeouts larger than 30 seconds to the 30-second maximum. For more information, see here: Setting timeouts for blob service operations For more information on setting timeouts for file shares, see here: Setting timeouts for file service operations For more information on setting timeouts on queues, see here: Setting timeouts for queue service operations

Parameters:

timeout - The timeout duration.

Method Details

getPipelinePosition

public HttpPipelinePosition getPipelinePosition()

Gets the position to place the policy.

Returns:

The position to place the policy.

process

public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)

Parameters:

context
next

processSync

public HttpResponse processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next)

Parameters:

context
next

Applies to