Class SyncPollerFactory
java.lang.Object
com.azure.core.management.polling.SyncPollerFactory
Factory to create SyncPoller for Azure Resource Manager (ARM) long-running-operation (LRO).
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> SyncPoller <PollResult<T>, U> create(SerializerAdapter serializerAdapter, HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Duration defaultPollDuration, Supplier<Response<BinaryData>> lroInitialResponseSupplier) Creates a SyncPoller with ARM LRO init operation.static <T,U> SyncPoller <PollResult<T>, U> create(SerializerAdapter serializerAdapter, HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Duration defaultPollDuration, Supplier<Response<BinaryData>> lroInitialResponseSupplier, Context context) Creates a SyncPoller with ARM LRO init operation.
-
Method Details
-
create
public static <T,U> SyncPoller<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Duration defaultPollDuration, Supplier<Response<BinaryData>> lroInitialResponseSupplier) Creates a SyncPoller with ARM LRO init operation.- Type Parameters:
T- the type of poll resultU- the type of final result- Parameters:
serializerAdapter- the serializer for any encoding and decodinghttpPipeline- the HttpPipeline for making any Http request (e.g. poll)pollResultType- the type of the poll result, if no result is expecting then this should be Void.classfinalResultType- the type of the final result, if no result is expecting then this should be Void.classdefaultPollDuration- the default poll interval to use if service does not return retry-afterlroInitialResponseSupplier- Supplier of the activation operation to activate (start) the long-running operation. This operation will be invoked at most once.- Returns:
- SyncPoller
-
create
public static <T,U> SyncPoller<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Duration defaultPollDuration, Supplier<Response<BinaryData>> lroInitialResponseSupplier, Context context) Creates a SyncPoller with ARM LRO init operation.- Type Parameters:
T- the type of poll resultU- the type of final result- Parameters:
serializerAdapter- the serializer for any encoding and decodinghttpPipeline- the HttpPipeline for making any Http request (e.g. poll)pollResultType- the type of the poll result, if no result is expecting then this should be Void.classfinalResultType- the type of the final result, if no result is expecting then this should be Void.classdefaultPollDuration- the default poll interval to use if service does not return retry-afterlroInitialResponseSupplier- Supplier of the activation operation to activate (start) the long-running operation. This operation will be invoked at most once.context- the context shared by all requests- Returns:
- SyncPoller
-