com.basho.riak.client.query
Class MapPhase

java.lang.Object
  extended by com.basho.riak.client.query.MapPhase
All Implemented Interfaces:
MapReducePhase
Direct Known Subclasses:
ReducePhase

public class MapPhase
extends Object
implements MapReducePhase

A Map Phase of a Map/Reduce job spec.

Author:
russell

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.basho.riak.client.query.MapReducePhase
MapReducePhase.PhaseType
 
Constructor Summary
MapPhase(Function phaseFunction)
          Create a MapPhase
MapPhase(Function phaseFunction, boolean keep)
          Create a MapPhase
MapPhase(Function phaseFunction, Object arg)
          Create a MapPhase
MapPhase(Function phaseFunction, Object arg, boolean keepResult)
          Create a MapPhase
 
Method Summary
 Object getArg()
           
 Function getPhaseFunction()
           
 MapReducePhase.PhaseType getType()
          The PhaseType of this MapReducePhase implementation.
 Boolean isKeep()
          Is this phase's output to be returned or only passed as input to the next phase.
static MapPhase map(Function function, Object arg, boolean keep)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapPhase

public MapPhase(Function phaseFunction,
                Object arg,
                boolean keepResult)
Create a MapPhase

Parameters:
phaseFunction - the Function
arg - an argument that will be passed to the phase verbatim (Object#toString)
keepResult - if the result should be returned or merely provide input for the next phase.
See Also:
MapReduce.addMapPhase(Function, Object, boolean)

MapPhase

public MapPhase(Function phaseFunction,
                Object arg)
Create a MapPhase

Parameters:
phaseFunction - the Function
arg - an argument that will be passed to the phase verbatim (Object#toString)
See Also:
MapReduce.addMapPhase(Function, Object)

MapPhase

public MapPhase(Function phaseFunction)
Create a MapPhase

Parameters:
phaseFunction - the Function
See Also:
MapReduce.addMapPhase(Function)

MapPhase

public MapPhase(Function phaseFunction,
                boolean keep)
Create a MapPhase

Parameters:
phaseFunction - the Function
keepResult - if the result should be returned or merely provide input for the next phase.
See Also:
MapReduce.addMapPhase(Function, Object, boolean)
Method Detail

getPhaseFunction

public Function getPhaseFunction()
Returns:
the phaseFunction

isKeep

public Boolean isKeep()
Description copied from interface: MapReducePhase
Is this phase's output to be returned or only passed as input to the next phase.

Specified by:
isKeep in interface MapReducePhase
Returns:
the keep

getArg

public Object getArg()
Returns:
the arg

map

public static MapPhase map(Function function,
                           Object arg,
                           boolean keep)

getType

public MapReducePhase.PhaseType getType()
Description copied from interface: MapReducePhase
The PhaseType of this MapReducePhase implementation.

Specified by:
getType in interface MapReducePhase
Returns:
a PhaseType.


Copyright © 2012. All Rights Reserved.