Class RateGateContinuation

java.lang.Object
com.sportradar.livedata.sdk.common.rategate.RateGateContinuation

public class RateGateContinuation extends Object
  • Constructor Details

    • RateGateContinuation

      public RateGateContinuation(RateGate gate, Executor executor)
      Construct a new RateGateContinuation
      Parameters:
      gate - - used rategate
      executor - - executor to invoke the continuation with
  • Method Details

    • after

      public static RateGateContinuation after(RateGate gate)
      Factory method to create a simple continuation.
      Parameters:
      gate - - for specified rategate
      Returns:

      A RateGateContinuation instance.

      Usage: RateGateContinuation.after(rg).continueWith(runnable);
    • continueWith

      public void continueWith(Runnable continuation) throws InterruptedException
      Continue executing the continuation when ready
      Parameters:
      continuation - - desired continuation
      Throws:
      InterruptedException - given thread were interrupted
    • continueWith

      public void continueWith(int amount, Runnable continuation) throws InterruptedException
      Continue executing the continuation when ready
      Parameters:
      amount - - positive amount
      continuation - - desired continuation
      Throws:
      InterruptedException - given thread were interrupted