org.apache.spark.partial
Class PartialResult<R>

Object
  extended by org.apache.spark.partial.PartialResult<R>

public class PartialResult<R>
extends Object


Constructor Summary
PartialResult(R initialVal, boolean isFinal)
           
 
Method Summary
 R getFinalValue()
          Blocking method to wait for and return the final value.
 R initialValue()
           
 boolean isInitialValueFinal()
           
<T> PartialResult<T>
map(scala.Function1<R,T> f)
          Transform this PartialResult into a PartialResult of type T.
 PartialResult<R> onComplete(scala.Function1<R,scala.runtime.BoxedUnit> handler)
          Set a handler to be called when this PartialResult completes.
 void onFail(scala.Function1<Exception,scala.runtime.BoxedUnit> handler)
          Set a handler to be called if this PartialResult's job fails.
 String toString()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartialResult

public PartialResult(R initialVal,
                     boolean isFinal)
Method Detail

initialValue

public R initialValue()

isInitialValueFinal

public boolean isInitialValueFinal()

getFinalValue

public R getFinalValue()
Blocking method to wait for and return the final value.

Returns:
(undocumented)

onComplete

public PartialResult<R> onComplete(scala.Function1<R,scala.runtime.BoxedUnit> handler)
Set a handler to be called when this PartialResult completes. Only one completion handler is supported per PartialResult.

Parameters:
handler - (undocumented)
Returns:
(undocumented)

onFail

public void onFail(scala.Function1<Exception,scala.runtime.BoxedUnit> handler)
Set a handler to be called if this PartialResult's job fails. Only one failure handler is supported per PartialResult.

Parameters:
handler - (undocumented)

map

public <T> PartialResult<T> map(scala.Function1<R,T> f)
Transform this PartialResult into a PartialResult of type T.

Parameters:
f - (undocumented)
Returns:
(undocumented)

toString

public String toString()
Overrides:
toString in class Object