Class AbstractPromise<T>
java.lang.Object
com.ticxo.modelengine.api.utils.promise.AbstractPromise<T>
- Direct Known Subclasses:
AbstractFoliaPromise,LegacyPromise
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) protected abstract <U> AbstractPromise<U>protected abstract voidexecuteAsync(Runnable runnable) protected abstract voidexecuteAsync(Runnable runnable, int delay) protected abstract voidexecuteSync(Runnable runnable) protected abstract voidexecuteSync(Runnable runnable, int delay) get()booleanbooleanisDone()runAsyncDelay(Runnable runnable, int delay) runSyncDelay(Runnable runnable, int delay) supplyAsync(Supplier<T> supplier) supplyAsyncDelay(Supplier<T> supplier, int delay) supplySync(Supplier<T> supplier) supplySyncDelay(Supplier<T> supplier, int delay) <U> Promise<U>thenApplyAsync(Function<? super T, ? extends U> function) <U> Promise<U>thenApplyAsyncDelay(Function<? super T, ? extends U> function, int delay) <U> Promise<U>thenApplySync(Function<? super T, ? extends U> function) <U> Promise<U>thenApplySyncDelay(Function<? super T, ? extends U> function, int delay) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ticxo.modelengine.api.utils.promise.Promise
thenAcceptAsync, thenAcceptAsyncDelay, thenAcceptSync, thenAcceptSyncDelay, thenRunAsync, thenRunAsyncDelay, thenRunSync, thenRunSyncDelay
-
Constructor Details
-
AbstractPromise
protected AbstractPromise() -
AbstractPromise
-
-
Method Details
-
runSync
-
runSyncDelay
- Specified by:
runSyncDelayin interfacePromise<T>
-
runAsync
-
runAsyncDelay
- Specified by:
runAsyncDelayin interfacePromise<T>
-
supplySync
- Specified by:
supplySyncin interfacePromise<T>
-
supplySyncDelay
- Specified by:
supplySyncDelayin interfacePromise<T>
-
supplyAsync
- Specified by:
supplyAsyncin interfacePromise<T>
-
supplyAsyncDelay
- Specified by:
supplyAsyncDelayin interfacePromise<T>
-
thenApplySync
- Specified by:
thenApplySyncin interfacePromise<T>
-
thenApplySyncDelay
- Specified by:
thenApplySyncDelayin interfacePromise<T>
-
thenApplyAsync
- Specified by:
thenApplyAsyncin interfacePromise<T>
-
thenApplyAsyncDelay
- Specified by:
thenApplyAsyncDelayin interfacePromise<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone() -
get
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
createEmpty
-
executeSync
-
executeSync
-
executeAsync
-
executeAsync
-