water
Class Atomic<T extends Atomic>

java.lang.Object
  extended by jsr166y.ForkJoinTask<java.lang.Void>
      extended by jsr166y.CountedCompleter
          extended by water.H2O.H2OCountedCompleter
              extended by water.DTask
                  extended by water.Atomic<T>
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.Future<java.lang.Void>, Freezable
Direct Known Subclasses:
DParseTask.AtomicUnion, TAtomic

public abstract class Atomic<T extends Atomic>
extends DTask

Atomic update of a Key

See Also:
Serialized Form

Field Summary
 Key _key
           
 
Fields inherited from class water.DTask
_cls, _eFromNode, _exception, _fname, _lineNum, _msg, _mth
 
Constructor Summary
Atomic()
           
 
Method Summary
abstract  Value atomic(Value val)
           
 void compute2()
           
 RPC<Atomic<T>> fork(Key key)
           
 T invoke(Key key)
          Block until it completes, even if run remotely
 void onSuccess()
          Executed on the transaction key's home node after any successful atomic update.
 byte priority()
           
 
Methods inherited from class water.DTask
clone, copyOver, dinvoke, frozenType, getDException, hasException, logVerbose, newInstance, onAck, onAckAck, onExceptionalCompletion, read, setException, toDocField, write, writeJSONFields
 
Methods inherited from class water.H2O.H2OCountedCompleter
compute
 
Methods inherited from class jsr166y.CountedCompleter
addToPendingCount, compareAndSetPendingCount, complete, exec, getCompleter, getPendingCount, getRawResult, onCompletion, setCompleter, setPendingCount, setRawResult, tryComplete
 
Methods inherited from class jsr166y.ForkJoinTask
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_key

public Key _key
Constructor Detail

Atomic

public Atomic()
Method Detail

atomic

public abstract Value atomic(Value val)

onSuccess

public void onSuccess()
Executed on the transaction key's home node after any successful atomic update. Override this if you need to perform some action after the update succeeds (eg cleanup).


invoke

public final T invoke(Key key)
Block until it completes, even if run remotely


fork

public final RPC<Atomic<T>> fork(Key key)

compute2

public final void compute2()
Specified by:
compute2 in class H2O.H2OCountedCompleter

priority

public byte priority()
Overrides:
priority in class H2O.H2OCountedCompleter