|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.commands.tx.AbstractTransactionBoundaryCommand org.infinispan.commands.tx.PrepareCommand
public class PrepareCommand
Command corresponding to the 1st phase of 2PC.
Field Summary | |
---|---|
static byte |
COMMAND_ID
|
protected WriteCommand[] |
modifications
|
protected CacheNotifier |
notifier
|
protected boolean |
onePhaseCommit
|
Fields inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand |
---|
cacheName, globalTx, icc, invoker, txTable |
Constructor Summary | |
---|---|
PrepareCommand()
|
|
PrepareCommand(GlobalTransaction gtx,
boolean onePhaseCommit,
WriteCommand... modifications)
|
|
PrepareCommand(GlobalTransaction gtx,
List<WriteCommand> commands,
boolean onePhaseCommit)
|
Method Summary | |
---|---|
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 |
existModifications()
|
Set<Object> |
getAffectedKeys()
|
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming. |
WriteCommand[] |
getModifications()
|
int |
getModificationsCount()
|
Object[] |
getParameters()
Used by marshallers to stream this command across a network |
boolean |
hasModifications()
|
void |
initialize(CacheNotifier notifier)
|
boolean |
isOnePhaseCommit()
|
Object |
perform(InvocationContext ignored)
Performs the primary function of the command. |
void |
setParameters(int commandId,
Object[] args)
Used by the CommandsFactory to create a command from raw data read off a stream. |
String |
toString()
|
Methods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand |
---|
equals, getCacheName, getGlobalTransaction, hashCode, init, setCacheName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte COMMAND_ID
protected WriteCommand[] modifications
protected boolean onePhaseCommit
protected CacheNotifier notifier
Constructor Detail |
---|
public PrepareCommand(GlobalTransaction gtx, boolean onePhaseCommit, WriteCommand... modifications)
public PrepareCommand(GlobalTransaction gtx, List<WriteCommand> commands, boolean onePhaseCommit)
public PrepareCommand()
Method Detail |
---|
public void initialize(CacheNotifier notifier)
public final Object perform(InvocationContext ignored) throws Throwable
ReplicableCommand
perform
in interface ReplicableCommand
perform
in class AbstractTransactionBoundaryCommand
ignored
- invocation context
Throwable
- in the event of problems.public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
ctx
- invocation contextvisitor
- visitor to accept
Throwable
- in the event of problemspublic WriteCommand[] getModifications()
public boolean isOnePhaseCommit()
public boolean existModifications()
public int getModificationsCount()
public byte getCommandId()
ReplicableCommand
public Object[] getParameters()
ReplicableCommand
getParameters
in interface ReplicableCommand
getParameters
in class AbstractTransactionBoundaryCommand
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 AbstractTransactionBoundaryCommand
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 PrepareCommand copy()
public String toString()
toString
in class AbstractTransactionBoundaryCommand
public boolean containsModificationType(Class<? extends ReplicableCommand> replicableCommandClass)
public boolean hasModifications()
public Set<Object> getAffectedKeys()
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |