|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.commands.remote.ReplicateCommand
public class ReplicateCommand
Command that implements cluster replication logic. Essentially mimics the replicate() and replicateAll() methods in 2.1.x, we may need to revisit the usefulness of such a command.
This is not aVisitableCommand
and hence
not passed up the CommandInterceptor
chain.
Field Summary | |
---|---|
static int |
MULTIPLE_METHOD_ID
|
static int |
SINGLE_METHOD_ID
|
Constructor Summary | |
---|---|
ReplicateCommand()
|
|
ReplicateCommand(List<ReplicableCommand> modifications)
|
|
ReplicateCommand(ReplicableCommand command)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SINGLE_METHOD_ID
public static final int MULTIPLE_METHOD_ID
Constructor Detail |
---|
public ReplicateCommand(List<ReplicableCommand> modifications)
public ReplicateCommand(ReplicableCommand command)
public ReplicateCommand()
Method Detail |
---|
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 ReplicableCommand
ctx
- invocation context, ignored.
GravitateDataCommand
, the result of processing this command is returned. Otherwise, null is returned.
Throwable
public int getCommandId()
ReplicableCommand
getCommandId
in interface ReplicableCommand
public List<ReplicableCommand> getModifications()
public ReplicableCommand getSingleModification()
public Object[] getParameters()
ReplicableCommand
getParameters
in interface ReplicableCommand
public void setParameters(int commandId, Object[] args)
ReplicableCommand
CommandsFactory
to create a command from raw data read off a stream.
setParameters
in interface ReplicableCommand
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 isSingleCommand()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public ReplicateCommand copy()
public boolean containsCommandType(Class<? extends ReplicableCommand> aClass)
public boolean removeCommands(List<Class<? extends ReplicableCommand>> whereFrom)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |