Package io.deephaven.client.impl
Interface TableService.TableHandleFuture
- All Superinterfaces:
Future<TableHandle>
- Enclosing interface:
- TableService
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelOrClose(Iterable<? extends TableService.TableHandleFuture> futures, boolean mayInterruptIfRunning) default TableHandleWaits if necessary for the computation to complete, and then retrieves its result.default TableHandlegetOrCancel(Duration timeout) Waits if necessary for at most the giventimeoutfor the computation to complete, and then retrieves its result.
-
Method Details
-
getOrCancel
Waits if necessary for the computation to complete, and then retrieves its result. If the current thread is interrupted while waiting,Future.cancel(boolean)will be invoked.After this method returns (normally or exceptionally),
thisfuture will bedone.- Returns:
- the table handle
- Throws:
InterruptedException- if the current thread was interrupted while waitingExecutionException- if the computation threw an exceptionCancellationException- if the computation was cancelled while waiting
-
getOrCancel
default TableHandle getOrCancel(Duration timeout) throws InterruptedException, ExecutionException, TimeoutException Waits if necessary for at most the giventimeoutfor the computation to complete, and then retrieves its result. If the current thread is interrupted while waiting or times out,Future.cancel(boolean)will be invoked.After this method returns (normally or exceptionally),
thisfuture will bedone.- Returns:
- the table handle
- Throws:
InterruptedException- if the current thread was interrupted while waitingExecutionException- if the computation threw an exceptionCancellationException- if the computation was cancelled while waitingTimeoutException
-
cancelOrClose
static void cancelOrClose(Iterable<? extends TableService.TableHandleFuture> futures, boolean mayInterruptIfRunning) Cancels all of thefuturesand closes anyTableHandlefromfuturesthat completed normally. AnyExecptionExceptionsorCancellationExceptionwill be disregarded.- Parameters:
futures- the futuresmayInterruptIfRunning-trueif the thread executing the task should be interrupted; otherwise, in-progress tasks are allowed to complete
-