public class ReplicateCommand extends Object implements ReplicableCommand
VisitableCommand and hence
not passed up the CommandInterceptor chain.
| Modifier and Type | Field and Description |
|---|---|
static int |
MULTIPLE_METHOD_ID |
static int |
SINGLE_METHOD_ID |
| Constructor and Description |
|---|
ReplicateCommand() |
ReplicateCommand(List<ReplicableCommand> modifications) |
ReplicateCommand(ReplicableCommand command) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCommandType(Class<? extends ReplicableCommand> aClass) |
ReplicateCommand |
copy()
Creates a copy of this command, amking a deep copy of any collections but everything else copied shallow.
|
boolean |
equals(Object o) |
int |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
List<ReplicableCommand> |
getModifications() |
Object[] |
getParameters()
Used by marshallers to stream this command across a network
|
ReplicableCommand |
getSingleModification() |
int |
hashCode() |
void |
initialize(InterceptorChain interceptorChain) |
boolean |
isSingleCommand() |
Object |
perform(InvocationContext ctx)
Executes commands replicated to the current cache instance by other cache instances.
|
boolean |
removeCommands(List<Class<? extends ReplicableCommand>> whereFrom) |
void |
setModifications(List<ReplicableCommand> modifications) |
void |
setParameters(int commandId,
Object[] args)
Used by the
CommandsFactory to create a command from raw data read off a stream. |
void |
setSingleModification(ReplicableCommand singleModification) |
String |
toString() |
public static final int SINGLE_METHOD_ID
public static final int MULTIPLE_METHOD_ID
public ReplicateCommand(List<ReplicableCommand> modifications)
public ReplicateCommand(ReplicableCommand command)
public ReplicateCommand()
public void initialize(InterceptorChain interceptorChain)
public void setSingleModification(ReplicableCommand singleModification)
public void setModifications(List<ReplicableCommand> modifications)
public Object perform(InvocationContext ctx) throws Throwable
perform in interface ReplicableCommandctx - invocation context, ignored.GravitateDataCommand, the result of processing this command is returned. Otherwise, null is returned.Throwablepublic int getCommandId()
ReplicableCommandgetCommandId in interface ReplicableCommandpublic List<ReplicableCommand> getModifications()
public ReplicableCommand getSingleModification()
public 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 isSingleCommand()
public ReplicateCommand copy()
public boolean containsCommandType(Class<? extends ReplicableCommand> aClass)
public boolean removeCommands(List<Class<? extends ReplicableCommand>> whereFrom)
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.