public class PrepareCommand extends AbstractTransactionCommand
| Modifier and Type | Field and Description |
|---|---|
protected org.jgroups.Address |
localAddress |
static int |
METHOD_ID |
protected List<WriteCommand> |
modifications |
protected boolean |
onePhaseCommit |
globalTransaction| Constructor and Description |
|---|
PrepareCommand() |
PrepareCommand(GlobalTransaction gtx,
List<WriteCommand> modifications,
org.jgroups.Address localAddress,
boolean onePhaseCommit) |
| Modifier and Type | Method and Description |
|---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
boolean |
containsModificationType(Class<? extends ReplicableCommand> replicableCommandClass) |
PrepareCommand |
copy() |
boolean |
equals(Object o) |
boolean |
existModifications() |
int |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
org.jgroups.Address |
getLocalAddress() |
List<WriteCommand> |
getModifications() |
int |
getModificationsCount() |
Object[] |
getParameters()
Used by marshallers to stream this command across a network
|
int |
hashCode() |
boolean |
isOnePhaseCommit() |
void |
removeModifications(Collection<WriteCommand> modificationsToRemove) |
void |
setParameters(int commandId,
Object[] args)
Used by the
CommandsFactory to create a command from raw data read off a stream. |
String |
toString() |
getGlobalTransaction, perform, setGlobalTransactionpublic static final int METHOD_ID
protected List<WriteCommand> modifications
protected org.jgroups.Address localAddress
protected boolean onePhaseCommit
public PrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, org.jgroups.Address localAddress, boolean onePhaseCommit)
public PrepareCommand()
public void removeModifications(Collection<WriteCommand> modificationsToRemove)
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommandctx - invocation contextvisitor - visitor to acceptThrowable - in the event of problemspublic List<WriteCommand> getModifications()
public org.jgroups.Address getLocalAddress()
public boolean isOnePhaseCommit()
public boolean existModifications()
public int getModificationsCount()
public int getCommandId()
ReplicableCommandpublic Object[] getParameters()
ReplicableCommandgetParameters in interface ReplicableCommandgetParameters in class AbstractTransactionCommandpublic void setParameters(int commandId,
Object[] args)
ReplicableCommandCommandsFactory to create a command from raw data read off a stream.setParameters in interface ReplicableCommandsetParameters in class AbstractTransactionCommandcommandId - 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 AbstractTransactionCommandpublic int hashCode()
hashCode in class AbstractTransactionCommandpublic PrepareCommand copy()
public String toString()
toString in class AbstractTransactionCommandpublic boolean containsModificationType(Class<? extends ReplicableCommand> replicableCommandClass)
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.