Interface LateScheduler<A>

Type Parameters:
A - type A object
All Superinterfaces:
CancellableScheduler
All Known Implementing Classes:
AsyncLateScheduler, FixedLateScheduler

public interface LateScheduler<A> extends CancellableScheduler
KarmaAPI single-object late scheduler
  • Method Details

    • whenComplete

      LateScheduler<A> whenComplete(Runnable paramRunnable)
      Set the complete action
      Parameters:
      paramRunnable - the action to perform when the scheduler is completed
      Returns:
      this instance
    • whenComplete

      LateScheduler<A> whenComplete(Consumer<A> paramConsumer)
      Set the complete action
      Parameters:
      paramConsumer - the action to perform when the scheduler is completed
      Returns:
      this instance
    • whenComplete

      LateScheduler<A> whenComplete(BiConsumer<A,​Throwable> paramBiConsumer)
      Set the complete action
      Parameters:
      paramBiConsumer - the action to perform when the scheduler is completed
      Returns:
      this instance
    • isCompleted

      boolean isCompleted()
      Get if the scheduler is completed
      Returns:
      if the shcheduler is complete
    • get

      A get()
      Get the A object
      Returns:
      the A object
    • complete

      void complete(A paramA)
      Complete the scheduler
      Parameters:
      paramA - the type A object
    • complete

      void complete(A paramA, Throwable paramThrowable)
      Complete the scheduler
      Parameters:
      paramA - the type A object
      paramThrowable - any error that has been thrown
    • thenCompleteUnder

      default LateScheduler<A> thenCompleteUnder(LateScheduler<A> next)
      Complete another single consumer with these objects
      Parameters:
      next - the other single consumer
      Returns:
      the other bi consumer