public class RPC<V extends DTask> extends java.lang.Object implements java.util.concurrent.Future<V>, java.util.concurrent.Delayed, ForkJoinPool.ManagedBlocker
Modifier and Type | Method and Description |
---|---|
RPC<V> |
addCompleter(H2O.H2OCountedCompleter task) |
boolean |
block()
Possibly blocks the current thread, for example waiting for
a lock or condition.
|
RPC<V> |
call() |
static <DT extends DTask> |
call(H2ONode target,
DT dtask) |
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(java.util.concurrent.Delayed t) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
long |
getDelay(java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isReleasable()
Returns
true if blocking is unnecessary. |
protected AutoBuffer |
response(AutoBuffer ab) |
public boolean isReleasable()
ForkJoinPool.ManagedBlocker
true
if blocking is unnecessary.isReleasable
in interface ForkJoinPool.ManagedBlocker
public boolean block() throws java.lang.InterruptedException
ForkJoinPool.ManagedBlocker
block
in interface ForkJoinPool.ManagedBlocker
true
if no additional blocking is necessary
(i.e., if isReleasable would return true)java.lang.InterruptedException
- if interrupted while waiting
(the method is not required to do so, but is allowed to)public final V get(long timeout, java.util.concurrent.TimeUnit unit)
public final boolean isDone()
public final boolean isCancelled()
public final boolean cancel(boolean mayInterruptIfRunning)
protected AutoBuffer response(AutoBuffer ab)
public RPC<V> addCompleter(H2O.H2OCountedCompleter task)
public final long getDelay(java.util.concurrent.TimeUnit unit)
getDelay
in interface java.util.concurrent.Delayed
public final int compareTo(java.util.concurrent.Delayed t)
compareTo
in interface java.lang.Comparable<java.util.concurrent.Delayed>