Class PollerFactory

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

public final class PollerFactory extends Object
Factory to create PollerFlux for Azure resource manager (ARM) long-running-operation (LRO).
  • Method Details

    • create

      public static <T, U> PollerFlux<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline pipeline, Type pollResultType, Type finalResultType, Duration defaultPollInterval, Mono<Response<Flux<ByteBuffer>>> lroInitMono)
      Creates a PollerFlux with default 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
      pipeline - 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
      defaultPollInterval - the default poll interval to use if service does not return retry-after
      lroInitMono - the Mono on subscribe send the service request to initiate the long-running-operation
      Returns:
      PollerFlux
    • create

      public static <T, U> PollerFlux<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline pipeline, Type pollResultType, Type finalResultType, Duration defaultPollInterval, Mono<Response<Flux<ByteBuffer>>> lroInitMono, Context context)
      Creates a PollerFlux with default 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
      pipeline - 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
      defaultPollInterval - the default poll interval to use if service does not return retry-after
      lroInitMono - the Mono on subscribe send the service request to initiate the long-running-operation
      context - the context shared by all requests
      Returns:
      PollerFlux
    • create

      public static <T, U> PollerFlux<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline pipeline, Type pollResultType, Type finalResultType, Duration defaultPollInterval, Function<PollingContext<PollResult<T>>,Mono<PollResult<T>>> lroInitOperation)
      Creates a PollerFlux.
      Type Parameters:
      T - the type of poll result
      U - the type of final result
      Parameters:
      serializerAdapter - the serializer for any encoding and decoding
      pipeline - 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
      defaultPollInterval - the default poll interval to use if service does not return retry-after
      lroInitOperation - the function upon invoking should initiate the long-running-operation
      Returns:
      PollerFlux
    • create

      public static <T, U> PollerFlux<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline pipeline, Type pollResultType, Type finalResultType, Duration defaultPollInterval, Function<PollingContext<PollResult<T>>,Mono<PollResult<T>>> lroInitOperation, Context context)
      Creates a PollerFlux.
      Type Parameters:
      T - the type of poll result
      U - the type of final result
      Parameters:
      serializerAdapter - the serializer for any encoding and decoding
      pipeline - 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
      defaultPollInterval - the default poll interval to use if service does not return retry-after
      lroInitOperation - the function upon invoking should initiate the long-running-operation
      context - the context shared by all requests
      Returns:
      PollerFlux
    • create

      public static <T, U> PollerFlux<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline pipeline, Type pollResultType, Type finalResultType, Duration defaultPollInterval, String pollingStateStr)
      Dehydrate a PollerFlux from a string.
      Type Parameters:
      T - the type of poll result
      U - the type of final result
      Parameters:
      serializerAdapter - the serializer for any encoding and decoding
      pipeline - 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
      defaultPollInterval - the default poll interval to use if service does not return retry-after
      pollingStateStr - the string to dehydrate PollerFlux from
      Returns:
      PollerFlux
    • create

      public static <T, U> PollerFlux<PollResult<T>,U> create(SerializerAdapter serializerAdapter, HttpPipeline pipeline, Type pollResultType, Type finalResultType, Duration defaultPollInterval, String pollingStateStr, Context context)
      Dehydrate a PollerFlux from a string.
      Type Parameters:
      T - the type of poll result
      U - the type of final result
      Parameters:
      serializerAdapter - the serializer for any encoding and decoding
      pipeline - 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
      defaultPollInterval - the default poll interval to use if service does not return retry-after
      pollingStateStr - the string to dehydrate PollerFlux from
      context - the context shared by all requests
      Returns:
      PollerFlux