Class AsyncPolling

java.lang.Object
com.sap.cds.feature.mt.lib.tools.AsyncPolling

public class AsyncPolling extends Object
Class that provides an asynchronous polling functionality executed in an own thread.
  • Method Details

    • execute

      public <T> void execute(Supplier<PollingResponse<T>> action, Consumer<PollingResponse<T>> finalAction)
      Start the polling operation
      Type Parameters:
      T - is the type of the result
      Parameters:
      action - is a lambda expression that is executed periodically until the operation is finished or the maximum runtime is reached
      finalAction - is an optional lambda expression called after the polling.
    • createBuilder

      public static AsyncPolling.AsyncPollingBuilder createBuilder()
      Returns:
      a builder for the asynchronous polling class