public abstract static class H2O.H2OCountedCompleter<T extends H2O.H2OCountedCompleter> extends CountedCompleter implements java.lang.Cloneable, Freezable
CountedCompleter to support priority
queues. F/J queues are simple unordered (and extremely light weight)
queues. However, we frequently need priorities to avoid deadlock and to
promote efficient throughput (e.g. failure to respond quickly to TaskGetKey can block an entire node for lack of some small piece of
data). So each attempt to do lower-priority F/J work starts with an
attempt to work and drain the higher-priority queues.| Modifier | Constructor and Description |
|---|---|
|
H2O.H2OCountedCompleter() |
protected |
H2O.H2OCountedCompleter(H2O.H2OCountedCompleter completer) |
| Modifier and Type | Method and Description |
|---|---|
T |
clone()
Make clone public, but without the annoying exception.
|
void |
compute()
Used by the F/J framework internally to do work.
|
protected abstract void |
compute2()
Override to specify actual work to do
|
int |
frozenType()
Returns a small dense integer, which is cluster-wide unique per-class.
|
protected Icer<T> |
icer()
Find the serialization delegate for a subclass of this class
|
protected byte |
nextThrPriority()
If this is a F/J thread, return it's priority+1 - used to lift the
priority of a blocking remote call, so the remote node runs it at a
higher priority - so we don't deadlock when we burn the local
thread.
|
boolean |
onExceptionalCompletion(java.lang.Throwable ex,
CountedCompleter caller)
Exceptional completion path; mostly does printing if the exception was
not handled earlier in the stack.
|
protected byte |
priority() |
T |
read_impl(AutoBuffer ab)
Implementation of the
Iced serialization protocol, only called by
auto-genned code. |
T |
read(AutoBuffer ab)
Standard "read thyself from the AutoBuffer" call, using the fast Iced protocol.
|
T |
readJSON_impl(AutoBuffer ab)
Implementation of the
Iced serialization protocol, only called by
auto-genned code. |
T |
readJSON(AutoBuffer ab)
Standard "read thyself from the AutoBuffer" call, using JSON.
|
AutoBuffer |
write_impl(AutoBuffer ab)
Implementation of the
Iced serialization protocol, only called by
auto-genned code. |
AutoBuffer |
write(AutoBuffer ab)
Standard "write thyself into the AutoBuffer" call, using the fast Iced
protocol.
|
AutoBuffer |
writeJSON_impl(AutoBuffer ab)
Implementation of the
Iced serialization protocol, only called by
auto-genned code. |
AutoBuffer |
writeJSON(AutoBuffer ab)
Standard "write thyself into the AutoBuffer" call, using JSON.
|
addToPendingCount, compareAndSetPendingCount, complete, exec, getCompleter, getPendingCount, getRawResult, onCompletion, setCompleter, setPendingCount, setRawResult, tryCompleteadapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnforkpublic H2O.H2OCountedCompleter()
protected H2O.H2OCountedCompleter(H2O.H2OCountedCompleter completer)
public final void compute()
compute2() which contains actual work.compute in class CountedCompleterprotected abstract void compute2()
public boolean onExceptionalCompletion(java.lang.Throwable ex,
CountedCompleter caller)
onExceptionalCompletion in class CountedCompleterex - the exceptioncaller - the task invoking this method (which may
be this task itself).protected byte priority()
public final T clone()
Freezableprotected final byte nextThrPriority()
public final AutoBuffer write(AutoBuffer ab)
FreezableIcer classes.write in interface Freezableab - AutoBuffer to write this object to.AutoBuffer for flow-coding.public final AutoBuffer writeJSON(AutoBuffer ab)
FreezableIcer classes.writeJSON in interface Freezableab - AutoBuffer to write this object to.AutoBuffer for flow-coding.public final T read(AutoBuffer ab)
FreezableIcer classes.public final T readJSON(AutoBuffer ab)
FreezableIcer classes.public final int frozenType()
FreezablefrozenType in interface Freezablepublic AutoBuffer write_impl(AutoBuffer ab)
FreezableIced serialization protocol, only called by
auto-genned code. Not intended to be called by user code. Override only
for custom Iced serializers.write_impl in interface Freezableab - AutoBuffer to write this object to.AutoBuffer for flow-coding.public T read_impl(AutoBuffer ab)
FreezableIced serialization protocol, only called by
auto-genned code. Not intended to be called by user code. Override only
for custom Iced serializers.public AutoBuffer writeJSON_impl(AutoBuffer ab)
FreezableIced serialization protocol, only called by
auto-genned code. Not intended to be called by user code. Override only
for custom Iced serializers.writeJSON_impl in interface Freezableab - AutoBuffer to write this object to.AutoBuffer for flow-coding.public T readJSON_impl(AutoBuffer ab)
FreezableIced serialization protocol, only called by
auto-genned code. Not intended to be called by user code. Override only
for custom Iced serializers.readJSON_impl in interface Freezableab - AutoBuffer to read this object from.