Package septogeddon.pluginquery
Class QueryCompletableFuture<T>
java.lang.Object
septogeddon.pluginquery.QueryFutureAdapter<T>
septogeddon.pluginquery.QueryCompletableFuture<T>
- All Implemented Interfaces:
QueryFuture<T>
-
Field Summary
Fields inherited from class septogeddon.pluginquery.QueryFutureAdapter
cause, done, result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcompleteExceptionally(Throwable cause) voidForce to wait current thread until the task finishedvoidjoinThread(long timeout) Force to wait current thread until the task finished, will ignore if its too long specified by timeoutMethods inherited from class septogeddon.pluginquery.QueryFutureAdapter
addListener, fireEvent, getCause, getResult, isDone, isSuccess, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface septogeddon.pluginquery.api.QueryFuture
printStackTrace, thenAccept
-
Constructor Details
-
QueryCompletableFuture
public QueryCompletableFuture()
-
-
Method Details
-
complete
- Overrides:
completein classQueryFutureAdapter<T>
-
completeExceptionally
- Overrides:
completeExceptionallyin classQueryFutureAdapter<T>
-
joinThread
public void joinThread()Description copied from interface:QueryFutureForce to wait current thread until the task finished -
joinThread
public void joinThread(long timeout) Description copied from interface:QueryFutureForce to wait current thread until the task finished, will ignore if its too long specified by timeout- Parameters:
timeout-
-