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 |
emitsIntoResultingCache() |
boolean |
equals(Object obj) |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Set<KOut> |
getKeys() |
Reducer<KOut,VOut> |
getReducer() |
String |
getResultCacheName() |
String |
getTaskId() |
UUID |
getUUID()
Returns UUID of a command
|
int |
hashCode() |
void |
init(MapReduceManager mrManager) |
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
boolean |
isUseIntermediateSharedCache() |
Object |
perform(InvocationContext context)
Performs invocation of reduce phase on assigned Infinispan node
|
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput). |
void |
setResultCacheName(String resultCacheName) |
void |
setUseIntermediateSharedCache(boolean useIntermediateSharedCache) |
String |
toString() |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput. |
getCacheName, getOrigin, setOriginclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCacheName, getOrigin, setOrigingetParameters, setParameterspublic 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 isUseIntermediateSharedCache()
public void setUseIntermediateSharedCache(boolean useIntermediateSharedCache)
public boolean emitsIntoResultingCache()
public String getResultCacheName()
public void setResultCacheName(String resultCacheName)
public String getTaskId()
public byte getCommandId()
ReplicableCommandgetCommandId in interface ReplicableCommandpublic UUID getUUID()
CancellableCommandgetUUID in interface CancellableCommandpublic void writeTo(ObjectOutput output) throws IOException
ReplicableCommandObjectOutput.writeTo in interface ReplicableCommandoutput - the stream.IOException - if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommandReplicableCommand.writeTo(ObjectOutput).readFrom in interface ReplicableCommandinput - the stream to read.IOException - if an error occurred during the I/O.ClassNotFoundException - if it tries to load an undefined class.public 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 © 2024 JBoss, a division of Red Hat. All rights reserved.