|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.commands.remote.BaseRpcCommand org.infinispan.commands.read.MapReduceCommand
public class MapReduceCommand
MapReduceCommand is used to migrate Mapper
and Reducer
to remote JVM where they
will get invoked.
Field Summary | |
---|---|
static int |
COMMAND_ID
|
protected DistributionManager |
dm
|
protected InvocationContextContainer |
icc
|
protected Set<Object> |
keys
|
protected Address |
localAddress
|
Fields inherited from class org.infinispan.commands.remote.BaseRpcCommand |
---|
cacheName |
Constructor Summary | |
---|---|
MapReduceCommand(Mapper m,
Reducer r,
String cacheName,
Collection<Object> inputKeys)
|
|
MapReduceCommand(Mapper m,
Reducer r,
String cacheName,
Object... inputKeys)
|
|
MapReduceCommand(String cacheName)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming. |
Object[] |
getParameters()
Used by marshallers to stream this command across a network |
int |
hashCode()
|
void |
init(CommandsFactory factory,
InterceptorChain invoker,
InvocationContextContainer icc,
DistributionManager dm,
Address localAddress)
|
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely. |
Object |
perform(InvocationContext context)
Performs invocation of mapping phase and local reduce phase before returning result to master node |
void |
setParameters(int commandId,
Object[] args)
Used by the CommandsFactory to create a command from raw data read off a stream. |
String |
toString()
|
Methods inherited from class org.infinispan.commands.remote.BaseRpcCommand |
---|
getCacheName, getOrigin, setOrigin |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int COMMAND_ID
protected Set<Object> keys
protected InvocationContextContainer icc
protected DistributionManager dm
protected Address localAddress
Constructor Detail |
---|
public MapReduceCommand(String cacheName)
public MapReduceCommand(Mapper m, Reducer r, String cacheName, Object... inputKeys)
public MapReduceCommand(Mapper m, Reducer r, String cacheName, Collection<Object> inputKeys)
Method Detail |
---|
public void init(CommandsFactory factory, InterceptorChain invoker, InvocationContextContainer icc, DistributionManager dm, Address localAddress)
public Object perform(InvocationContext context) throws Throwable
context
- invocation context
Throwable
- in the event of problems.public byte getCommandId()
ReplicableCommand
public Object[] getParameters()
ReplicableCommand
public void setParameters(int commandId, Object[] args)
ReplicableCommand
CommandsFactory
to create a command from raw data read off a stream.
commandId
- command id to set. This is usually unused but *could* be used in the event of a command having
multiple IDs, such as PutKeyValueCommand
.args
- object array of argspublic boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class BaseRpcCommand
public boolean isReturnValueExpected()
ReplicableCommand
ResponseGenerator
may choose to simply return null to save on marshalling costs.
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |