public class GravitateDataCommand extends AbstractDataCommand
DataGravitatorInterceptor.
This is the equivalent of the old MethodCallDefinitions.dataGravitationMethod method call from 2.1.x.
| Modifier and Type | Field and Description |
|---|---|
static int |
METHOD_ID |
protected boolean |
searchSubtrees |
dataContainer, fqn| Constructor and Description |
|---|
GravitateDataCommand(org.jgroups.Address localAddress) |
GravitateDataCommand(Fqn fqn,
boolean searchSubtrees,
org.jgroups.Address localAddress) |
| Modifier and Type | Method and Description |
|---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
boolean |
equals(Object o) |
protected Set<Object> |
getBackupRoots() |
int |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Object[] |
getParameters()
Basic versions of these methods
|
int |
hashCode() |
void |
initialize(DataContainer dataContainer,
CacheSPI spi,
BuddyFqnTransformer transformer) |
boolean |
isSearchSubtrees() |
Object |
perform(InvocationContext ctx)
Searches for data to gravitate given an Fqn and whether buddy backup subtrees are to be searched as well.
|
void |
setParameters(int commandId,
Object[] args)
Basic versions of these methods
|
protected List<Object> |
sortBackupRoots(Set<Object> allGroupNames) |
String |
toString() |
getFqn, initializepublic static final int METHOD_ID
protected boolean searchSubtrees
public GravitateDataCommand(Fqn fqn, boolean searchSubtrees, org.jgroups.Address localAddress)
public GravitateDataCommand(org.jgroups.Address localAddress)
public void initialize(DataContainer dataContainer, CacheSPI spi, BuddyFqnTransformer transformer)
public Object perform(InvocationContext ctx)
ctx - invocation contextGravitateResult containing node data, as well as information on whether this was found in a primary or backup tree.protected Set<Object> getBackupRoots()
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommandctx - invocation contextvisitor - visitor to acceptThrowable - in the event of problemspublic int getCommandId()
ReplicableCommandpublic boolean isSearchSubtrees()
public Object[] getParameters()
AbstractDataCommandgetParameters in interface ReplicableCommandgetParameters in class AbstractDataCommandpublic void setParameters(int commandId,
Object[] args)
AbstractDataCommandsetParameters in interface ReplicableCommandsetParameters in class AbstractDataCommandcommandId - 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 equals(Object o)
equals in class AbstractDataCommandpublic int hashCode()
hashCode in class AbstractDataCommandpublic String toString()
toString in class AbstractDataCommandCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.