public class OptimisticPrepareCommand extends PrepareCommand
PrepareCommand
.Modifier and Type | Field and Description |
---|---|
static int |
METHOD_ID |
localAddress, modifications, onePhaseCommit
globalTransaction
Constructor and Description |
---|
OptimisticPrepareCommand() |
OptimisticPrepareCommand(GlobalTransaction gtx,
List<WriteCommand> modifications,
org.jgroups.Address address,
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.
|
OptimisticPrepareCommand |
copy()
A shallow copy of all fields except collections.
|
int |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Object[] |
getParameters()
Used by marshallers to stream this command across a network
|
void |
setParameters(int commandId,
Object[] args)
Used by the
CommandsFactory to create a command from raw data read off a stream. |
String |
toString() |
containsModificationType, equals, existModifications, getLocalAddress, getModifications, getModificationsCount, hashCode, isOnePhaseCommit, removeModifications
getGlobalTransaction, perform, setGlobalTransaction
public static final int METHOD_ID
public OptimisticPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, org.jgroups.Address address, boolean onePhaseCommit)
public OptimisticPrepareCommand()
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
acceptVisitor
in interface VisitableCommand
acceptVisitor
in class PrepareCommand
ctx
- invocation contextvisitor
- visitor to acceptThrowable
- in the event of problemspublic int getCommandId()
ReplicableCommand
getCommandId
in interface ReplicableCommand
getCommandId
in class PrepareCommand
public Object[] getParameters()
ReplicableCommand
getParameters
in interface ReplicableCommand
getParameters
in class PrepareCommand
public OptimisticPrepareCommand copy()
copy
in class PrepareCommand
public void setParameters(int commandId, Object[] args)
ReplicableCommand
CommandsFactory
to create a command from raw data read off a stream.setParameters
in interface ReplicableCommand
setParameters
in class PrepareCommand
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 String toString()
toString
in class PrepareCommand
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.