public abstract static class H2O.H2OCountedCompleter<T extends H2O.H2OCountedCompleter> extends CountedCompleter implements java.lang.Cloneable, Freezable<T>
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 |
|---|---|
|
H2OCountedCompleter() |
protected |
H2OCountedCompleter(byte prior) |
protected |
H2OCountedCompleter(H2O.H2OCountedCompleter completer) |
protected |
H2OCountedCompleter(H2O.H2OCountedCompleter completer,
byte prior) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asBytes()
Return serialized version of self as a byte array.
|
T |
clone()
Make clone public, but without the annoying exception.
|
void |
compute()
Used by the F/J framework internally to do work.
|
void |
compute1() |
void |
compute2()
Override compute3() with actual work without having to worry about tryComplete()
|
protected static byte |
currThrPriority()
If this is a F/J thread, return it's priority - 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.
|
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 |
priority() |
T |
read(AutoBuffer ab)
Standard "read thyself from the AutoBuffer" call, using the fast Iced protocol.
|
T |
readJSON(AutoBuffer ab)
Standard "read thyself from the AutoBuffer" call, using JSON.
|
T |
reloadFromBytes(byte[] ary)
Replace yourself with deserialized version from the given bytes.
|
AutoBuffer |
write(AutoBuffer ab)
Standard "write thyself into the AutoBuffer" call, using the fast Iced
protocol.
|
AutoBuffer |
writeJSON(AutoBuffer ab)
Standard "write thyself into the AutoBuffer" call, using JSON.
|
__tryComplete, addToPendingCount, compareAndSetPendingCount, complete, exec, getCompleter, getPendingCount, getRawResult, onCompletion, onExceptionalCompletion, 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 H2OCountedCompleter()
protected H2OCountedCompleter(H2O.H2OCountedCompleter completer)
protected H2OCountedCompleter(byte prior)
protected H2OCountedCompleter(H2O.H2OCountedCompleter completer, byte prior)
public byte[] asBytes()
FreezableasBytes in interface Freezable<T extends H2O.H2OCountedCompleter>public T reloadFromBytes(byte[] ary)
FreezablereloadFromBytes in interface Freezable<T extends H2O.H2OCountedCompleter>ary - byte array containing exactly (i.e. nothing else) the serialized version of the Freezablepublic final void compute()
compute2() which contains actual work.compute in class CountedCompleterpublic void compute1()
public void compute2()
protected final byte priority()
public final T clone()
Freezableclone in interface Freezable<T extends H2O.H2OCountedCompleter>clone in class java.lang.Objectprotected static byte currThrPriority()
public final AutoBuffer write(AutoBuffer ab)
FreezableIcer classes.write in interface Freezable<T extends H2O.H2OCountedCompleter>ab - AutoBuffer to write this object to.AutoBuffer for flow-coding.public final AutoBuffer writeJSON(AutoBuffer ab)
FreezableIcer classes.writeJSON in interface Freezable<T extends H2O.H2OCountedCompleter>ab - AutoBuffer to write this object to.AutoBuffer for flow-coding.public final T read(AutoBuffer ab)
FreezableIcer classes.read in interface Freezable<T extends H2O.H2OCountedCompleter>ab - AutoBuffer to read this object from.public final T readJSON(AutoBuffer ab)
FreezableIcer classes.readJSON in interface Freezable<T extends H2O.H2OCountedCompleter>ab - AutoBuffer to read this object from.public final int frozenType()
FreezablefrozenType in interface Freezable<T extends H2O.H2OCountedCompleter>