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, setOrigin
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCacheName, getOrigin, setOrigin
getParameters, setParameters
public static final int COMMAND_ID
public ReduceCommand(String cacheName)
public void init(MapReduceManager mrManager)
public Object perform(InvocationContext context) throws Throwable
perform
in interface ReplicableCommand
context
- 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()
ReplicableCommand
getCommandId
in interface ReplicableCommand
public UUID getUUID()
CancellableCommand
getUUID
in interface CancellableCommand
public void writeTo(ObjectOutput output) throws IOException
ReplicableCommand
ObjectOutput
.writeTo
in interface ReplicableCommand
output
- the stream.IOException
- if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommand
ReplicableCommand.writeTo(ObjectOutput)
.readFrom
in interface ReplicableCommand
input
- 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()
ReplicableCommand
ResponseGenerator
may choose to simply return null to save on marshalling costs.isReturnValueExpected
in interface ReplicableCommand
public boolean canBlock()
ReplicableCommand
canBlock
in interface ReplicableCommand
canBlock
in class BaseRpcCommand
true
if the command can block/wait, false
otherwisepublic String toString()
toString
in class BaseRpcCommand
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.