|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
public abstract class AbstractTransactionBoundaryCommand
An abstract transaction boundary command that holds a reference to a GlobalTransaction
Field Summary | |
---|---|
protected String |
cacheName
|
protected ComponentRegistry |
componentRegistry
|
protected Configuration |
configuration
|
protected GlobalTransaction |
globalTx
|
protected InvocationContextContainer |
icc
|
protected InterceptorChain |
invoker
|
protected TransactionTable |
txTable
|
Constructor Summary | |
---|---|
AbstractTransactionBoundaryCommand()
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getCacheName()
|
ComponentRegistry |
getComponentRegistry()
Retrieves the component registry associated with this command |
Configuration |
getConfiguration()
Retrieves the configuration associated with this command |
GlobalTransaction |
getGlobalTransaction()
|
Address |
getOrigin()
Get the origin of the command |
Object[] |
getParameters()
Used by marshallers to stream this command across a network |
int |
hashCode()
|
boolean |
ignoreCommandOnStatus(ComponentStatus status)
Similar to VisitableCommand.shouldInvoke(InvocationContext) but evaluated by InvocationContextInterceptor . |
void |
init(InterceptorChain chain,
InvocationContextContainer icc,
TransactionTable txTable)
|
void |
injectComponents(Configuration configuration,
ComponentRegistry componentRegistry)
Sets up some more context for the invocation of this command, so that these components wouldn't need to be looked up again later. |
protected Object |
invalidRemoteTxReturnValue()
This is what is returned to remote callers when an invalid RemoteTransaction is encountered. |
void |
markTransactionAsRemote(boolean isRemote)
|
Object |
perform(InvocationContext ctx)
Performs the primary function of the command. |
void |
setCacheName(String cacheName)
|
void |
setOrigin(Address origin)
Set the origin of the command |
void |
setParameters(int commandId,
Object[] args)
Used by the CommandsFactory to create a command from raw data read off a stream. |
boolean |
shouldInvoke(InvocationContext ctx)
Used by the InboundInvocationHandler to determine whether the command should be invoked or not. |
String |
toString()
|
protected void |
visitRemoteTransaction(RemoteTransaction tx)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.infinispan.commands.VisitableCommand |
---|
acceptVisitor |
Methods inherited from interface org.infinispan.commands.ReplicableCommand |
---|
getCommandId |
Field Detail |
---|
protected GlobalTransaction globalTx
protected String cacheName
protected InterceptorChain invoker
protected InvocationContextContainer icc
protected TransactionTable txTable
protected Configuration configuration
protected ComponentRegistry componentRegistry
Constructor Detail |
---|
public AbstractTransactionBoundaryCommand()
Method Detail |
---|
public void injectComponents(Configuration configuration, ComponentRegistry componentRegistry)
CacheRpcCommand
injectComponents
in interface CacheRpcCommand
configuration
- configuration of the named cache associated with this commandcomponentRegistry
- component registry of the named cache associated with this commandpublic Configuration getConfiguration()
CacheRpcCommand
getConfiguration
in interface CacheRpcCommand
public ComponentRegistry getComponentRegistry()
CacheRpcCommand
getComponentRegistry
in interface CacheRpcCommand
public void init(InterceptorChain chain, InvocationContextContainer icc, TransactionTable txTable)
public String getCacheName()
getCacheName
in interface CacheRpcCommand
public void setCacheName(String cacheName)
public GlobalTransaction getGlobalTransaction()
getGlobalTransaction
in interface TransactionBoundaryCommand
public void markTransactionAsRemote(boolean isRemote)
markTransactionAsRemote
in interface TransactionBoundaryCommand
protected Object invalidRemoteTxReturnValue()
public Object perform(InvocationContext ctx) throws Throwable
ReplicableCommand
perform
in interface ReplicableCommand
ctx
- invocation context
Throwable
- in the event of problems.protected void visitRemoteTransaction(RemoteTransaction tx)
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 shouldInvoke(InvocationContext ctx)
VisitableCommand
shouldInvoke
in interface VisitableCommand
public boolean ignoreCommandOnStatus(ComponentStatus status)
VisitableCommand
VisitableCommand.shouldInvoke(InvocationContext)
but evaluated by InvocationContextInterceptor
.
Commands can opt to be discarded in case the cache status is not suited (as InvalidateCommand
)
ignoreCommandOnStatus
in interface VisitableCommand
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public Address getOrigin()
CacheRpcCommand
getOrigin
in interface CacheRpcCommand
public void setOrigin(Address origin)
CacheRpcCommand
setOrigin
in interface CacheRpcCommand
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |