Class SyncPollerFactory

java.lang.Object
com.azure.core.management.polling.SyncPollerFactory

public final class SyncPollerFactory extends Object
Factory to create SyncPoller for Azure Resource Manager (ARM) long-running-operation (LRO).
  • 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 result
      U - the type of final result
      Parameters:
      serializerAdapter - the serializer for any encoding and decoding
      httpPipeline - 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.class
      finalResultType - the type of the final result, if no result is expecting then this should be Void.class
      defaultPollDuration - the default poll interval to use if service does not return retry-after
      lroInitialResponseSupplier - 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 result
      U - the type of final result
      Parameters:
      serializerAdapter - the serializer for any encoding and decoding
      httpPipeline - 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.class
      finalResultType - the type of the final result, if no result is expecting then this should be Void.class
      defaultPollDuration - the default poll interval to use if service does not return retry-after
      lroInitialResponseSupplier - 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