public abstract class AbstractTransactionBoundaryCommand extends Object implements TransactionBoundaryCommand
GlobalTransactionVisitableCommand.LoadType| Modifier and Type | Field and Description |
|---|---|
protected ByteString |
cacheName |
protected GlobalTransaction |
globalTx |
| Constructor and Description |
|---|
AbstractTransactionBoundaryCommand(ByteString cacheName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ByteString |
getCacheName() |
GlobalTransaction |
getGlobalTransaction() |
Address |
getOrigin()
Get the origin of the command
|
int |
getTopologyId() |
int |
hashCode() |
protected Object |
invalidRemoteTxReturnValue(TransactionTable txTable)
This is what is returned to remote callers when an invalid RemoteTransaction is encountered.
|
CompletionStage<?> |
invokeAsync(ComponentRegistry registry)
Invoke the command asynchronously.
|
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
VisitableCommand.LoadType |
loadType() |
void |
markTransactionAsRemote(boolean isRemote) |
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput). |
void |
setOrigin(Address origin)
Sets the sender's
Address. |
void |
setTopologyId(int topologyId) |
String |
toString() |
protected void |
visitRemoteTransaction(RemoteTransaction tx) |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitacceptVisitor, initcanBlock, getCommandId, invoke, invokeAsync, isSuccessfulprotected GlobalTransaction globalTx
protected final ByteString cacheName
public AbstractTransactionBoundaryCommand(ByteString cacheName)
public int getTopologyId()
getTopologyId in interface TopologyAffectedCommandpublic void setTopologyId(int topologyId)
setTopologyId in interface TopologyAffectedCommandpublic ByteString getCacheName()
getCacheName in interface CacheRpcCommandpublic GlobalTransaction getGlobalTransaction()
getGlobalTransaction in interface TransactionBoundaryCommandpublic void markTransactionAsRemote(boolean isRemote)
markTransactionAsRemote in interface TransactionBoundaryCommandprotected Object invalidRemoteTxReturnValue(TransactionTable txTable)
public CompletionStage<?> invokeAsync(ComponentRegistry registry) throws Throwable
CacheRpcCommand
This method replaces ReplicableCommand.invoke() for remote execution.
The default implementation and ReplicableCommand.invoke() will be removed in future versions.
invokeAsync in interface CacheRpcCommandThrowableprotected void visitRemoteTransaction(RemoteTransaction tx)
public void writeTo(ObjectOutput output) throws IOException
ReplicableCommandObjectOutput.writeTo in interface ReplicableCommandoutput - the stream.IOException - if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommandReplicableCommand.writeTo(ObjectOutput).readFrom in interface ReplicableCommandinput - the stream to read.IOException - if an error occurred during the I/O.ClassNotFoundException - if it tries to load an undefined class.public VisitableCommand.LoadType loadType()
loadType in interface VisitableCommandpublic Address getOrigin()
CacheRpcCommandgetOrigin in interface CacheRpcCommandpublic void setOrigin(Address origin)
ReplicableCommandAddress.
By default, it doesn't set anything. Implement this method if the sender's Address is needed.
setOrigin in interface CacheRpcCommandsetOrigin in interface ReplicableCommandorigin - the sender's Addresspublic boolean isReturnValueExpected()
ReplicableCommandResponseGenerator may choose to simply return null to save on marshalling
costs.isReturnValueExpected in interface ReplicableCommandCopyright © 2022 JBoss by Red Hat. All rights reserved.