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 serializatoin 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.
|
DocGen.HTML |
writeHTML_impl(DocGen.HTML ab)
Implementation of the
Iced serialization protocol, only called by
auto-genned code. |
DocGen.HTML |
writeHTML(DocGen.HTML ab)
Standard "write thyself into the AutoBuffer" call, using HTML.
|
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, tryComplete
adapt, 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, tryUnfork
public H2O.H2OCountedCompleter()
protected H2O.H2OCountedCompleter(H2O.H2OCountedCompleter completer)
public final void compute()
compute2()
which contains actual work.compute
in class CountedCompleter
protected abstract void compute2()
public boolean onExceptionalCompletion(java.lang.Throwable ex, CountedCompleter caller)
onExceptionalCompletion
in class CountedCompleter
ex
- the exceptioncaller
- the task invoking this method (which may
be this task itself).protected byte priority()
public final T clone()
Freezable
protected final byte nextThrPriority()
public final AutoBuffer write(AutoBuffer ab)
Freezable
Icer
classes.write
in interface Freezable
ab
- AutoBuffer
to write this object to.AutoBuffer
for flow-coding.public final AutoBuffer writeJSON(AutoBuffer ab)
Freezable
Icer
classes.writeJSON
in interface Freezable
ab
- AutoBuffer
to write this object to.AutoBuffer
for flow-coding.public final DocGen.HTML writeHTML(DocGen.HTML ab)
Freezable
Icer
classes.writeHTML
in interface Freezable
ab
- target to serialize this object in HTML formAutoBuffer
for flow-coding.public final T read(AutoBuffer ab)
Freezable
Icer
classes.public final T readJSON(AutoBuffer ab)
Freezable
Icer
classes.public final int frozenType()
Freezable
frozenType
in interface Freezable
public AutoBuffer write_impl(AutoBuffer ab)
Freezable
Iced
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 Freezable
ab
- AutoBuffer
to write this object to.AutoBuffer
for flow-coding.public T read_impl(AutoBuffer ab)
Freezable
Iced
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)
Freezable
Iced
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 Freezable
ab
- AutoBuffer
to write this object to.AutoBuffer
for flow-coding.public T readJSON_impl(AutoBuffer ab)
Freezable
Iced
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 Freezable
ab
- AutoBuffer
to read this object from.public DocGen.HTML writeHTML_impl(DocGen.HTML ab)
Freezable
Iced
serialization protocol, only called by
auto-genned code. Not intended to be called by user code. Override only
for custom Iced serializers.writeHTML_impl
in interface Freezable
ab
- html to write object to.