public class ReduceCommand<KOut,VOut> extends BaseRpcCommand implements CancellableCommand
Reducer to a remote Infinispan node where it will
get executed and return the result to an invoking/master node.| Modifier and Type | Field and Description |
|---|---|
static int |
COMMAND_ID |
cacheName| Constructor and Description |
|---|
ReduceCommand(String cacheName) |
ReduceCommand(String taskId,
Reducer<KOut,VOut> reducer,
String cacheName,
Collection<KOut> inputKeys) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBlock()
If true, the command is processed asynchronously in a thread provided by an Infinispan thread pool.
|
boolean |
equals(Object obj) |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Set<KOut> |
getKeys() |
Object[] |
getParameters()
Used by marshallers to stream this command across a network
|
Reducer<KOut,VOut> |
getReducer() |
String |
getTaskId() |
UUID |
getUUID()
Returns UUID of a command
|
int |
hashCode() |
void |
init(MapReduceManager mrManager) |
boolean |
isEmitCompositeIntermediateKeys() |
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
Object |
perform(InvocationContext context)
Performs invocation of reduce phase on assigned Infinispan node
|
void |
setEmitCompositeIntermediateKeys(boolean emitCompositeIntermediateKeys) |
void |
setParameters(int commandId,
Object[] args)
Used by the
CommandsFactory to create a command from raw data read off a stream. |
String |
toString() |
getCacheName, getOrigin, setOriginclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCacheName, getOrigin, setOriginpublic static final int COMMAND_ID
public ReduceCommand(String cacheName)
public void init(MapReduceManager mrManager)
public Object perform(InvocationContext context) throws Throwable
perform in interface ReplicableCommandcontext - invocation contextThrowable - in the event of problems.public boolean isEmitCompositeIntermediateKeys()
public void setEmitCompositeIntermediateKeys(boolean emitCompositeIntermediateKeys)
public String getTaskId()
public byte getCommandId()
ReplicableCommandgetCommandId in interface ReplicableCommandpublic UUID getUUID()
CancellableCommandgetUUID in interface CancellableCommandpublic Object[] getParameters()
ReplicableCommandgetParameters in interface ReplicableCommandpublic void setParameters(int commandId,
Object[] args)
ReplicableCommandCommandsFactory to create a command from raw data read off a stream.setParameters in interface ReplicableCommandcommandId - 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 isReturnValueExpected()
ReplicableCommandResponseGenerator
may choose to simply return null to save on marshalling costs.isReturnValueExpected in interface ReplicableCommandpublic boolean canBlock()
ReplicableCommandcanBlock in interface ReplicableCommandcanBlock in class BaseRpcCommandtrue if the command can block/wait, false otherwisepublic String toString()
toString in class BaseRpcCommandCopyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.