Package io.deephaven.client.impl
Interface TableService.TableHandleFuture
- All Superinterfaces:
Future<TableHandle>
- Enclosing interface:
- TableService
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
cancelOrClose
(Iterable<? extends TableService.TableHandleFuture> futures, boolean mayInterruptIfRunning) default TableHandle
Waits if necessary for the computation to complete, and then retrieves its result.default TableHandle
getOrCancel
(Duration timeout) Waits if necessary for at most the giventimeout
for 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),
this
future 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 giventimeout
for 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),
this
future 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 thefutures
and closes anyTableHandle
fromfutures
that completed normally. AnyExecptionExceptions
orCancellationException
will be disregarded.- Parameters:
futures
- the futuresmayInterruptIfRunning
-true
if the thread executing the task should be interrupted; otherwise, in-progress tasks are allowed to complete
-