Interface LateScheduler<A>
- Type Parameters:
A- type A object
- All Superinterfaces:
CancellableScheduler
- All Known Implementing Classes:
AsyncLateScheduler,FixedLateScheduler
KarmaAPI single-object late scheduler
-
Method Summary
Modifier and TypeMethodDescriptionvoidComplete the schedulervoidComplete the schedulerget()Get the A objectbooleanGet if the scheduler is completeddefault LateScheduler<A>thenCompleteUnder(LateScheduler<A> next)Complete another single consumer with these objectswhenComplete(Runnable paramRunnable)Set the complete actionwhenComplete(BiConsumer<A,Throwable> paramBiConsumer)Set the complete actionwhenComplete(Consumer<A> paramConsumer)Set the complete actionMethods inherited from interface ml.karmaconfigs.api.common.timer.scheduler.CancellableScheduler
isCancelled, setCancelled, whenCancelled
-
Method Details
-
whenComplete
Set the complete action- Parameters:
paramRunnable- the action to perform when the scheduler is completed- Returns:
- this instance
-
whenComplete
Set the complete action- Parameters:
paramConsumer- the action to perform when the scheduler is completed- Returns:
- this instance
-
whenComplete
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
Complete the scheduler- Parameters:
paramA- the type A object
-
complete
Complete the scheduler- Parameters:
paramA- the type A objectparamThrowable- any error that has been thrown
-
thenCompleteUnder
Complete another single consumer with these objects- Parameters:
next- the other single consumer- Returns:
- the other bi consumer
-