Interface ReplicableCommand
- All Superinterfaces:
TracedCommand
,VersionAware
- All Known Subinterfaces:
org.infinispan.commands.remote.CacheRpcCommand
,DataCommand
,FlagAffectedCommand
,GlobalRpcCommand
,RemoteLockCommand
,TopologyAffectedCommand
,TransactionalRemoteLockCommand
,VisitableCommand
- All Known Implementing Classes:
org.infinispan.commands.read.AbstractDataCommand
,AbstractFlagAffectedCommand
,AbstractTopologyAffectedCommand
,org.infinispan.commands.remote.BaseRpcCommand
,ForwardCommitCommand
,ForwardRollbackCommand
,HeartBeatCommand
,MultiClusterEventCommand
,ReplicableManagerFunctionCommand
,ReplicableRunnableCommand
,TouchCommand
,XSiteAmendOfflineStatusCommand
,XSiteAutoTransferStatusCommand
,XSiteLocalEventCommand
,XSiteSetStateTransferModeCommand
,XSiteStatePushCommand
,XSiteStateTransferCancelSendCommand
,XSiteStateTransferClearStatusCommand
,XSiteStateTransferFinishReceiveCommand
,XSiteStateTransferFinishSendCommand
,XSiteStateTransferRestartSendingCommand
,XSiteStateTransferStartReceiveCommand
,XSiteStateTransferStartSendCommand
,XSiteStateTransferStatusRequestCommand
The core of the command-based cache framework. Commands correspond to specific areas of functionality in the cache,
and can be replicated using the
RpcManager
- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com, Manik Surtani
-
Method Summary
Modifier and TypeMethodDescriptiondefault byte
Deprecated, for removal: This API element is subject to removal in a future version.since 16.0 as this is no longer required by the Protostream based marshaller.boolean
If true, a return value will be provided when performed remotely.default boolean
If true, a return value will be marshalled as aSuccessfulResponse
, otherwise it will be marshalled as aUnsuccessfulResponse
.default boolean
default void
readFrom
(ObjectInput input) Deprecated, for removal: This API element is subject to removal in a future version.since 16.0 command objects should be marshalled directly by ProtoStreamdefault void
Sets the sender'sAddress
.Returns aNodeVersion
representing the Infinispan version in which this command was added.default void
writeTo
(ObjectOutput output) Deprecated, for removal: This API element is subject to removal in a future version.since 16.0 command objects should be marshalled directly by ProtoStreamMethods inherited from interface org.infinispan.commands.TracedCommand
getOperationName, getSpanAttributes, setSpanAttributes
-
Method Details
-
getCommandId
Deprecated, for removal: This API element is subject to removal in a future version.since 16.0 as this is no longer required by the Protostream based marshaller. Implementations of this method are always ignored.Used by marshallers to convert this command into an id for streaming.- Returns:
- the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.
-
isReturnValueExpected
boolean isReturnValueExpected()If true, a return value will be provided when performed remotely. Otherwise, a remoteResponseGenerator
may choose to simply return null to save on marshalling costs.- Returns:
- true or false
-
isSuccessful
default boolean isSuccessful()If true, a return value will be marshalled as aSuccessfulResponse
, otherwise it will be marshalled as aUnsuccessfulResponse
. -
logThrowable
-
writeTo
@Deprecated(forRemoval=true, since="16.0") default void writeTo(ObjectOutput output) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.since 16.0 command objects should be marshalled directly by ProtoStreamWrites this instance to theObjectOutput
.- Parameters:
output
- the stream.- Throws:
IOException
- if an error occurred during the I/O.
-
readFrom
@Deprecated(forRemoval=true, since="16.0") default void readFrom(ObjectInput input) throws IOException, ClassNotFoundException Deprecated, for removal: This API element is subject to removal in a future version.since 16.0 command objects should be marshalled directly by ProtoStreamReads this instance from the stream written bywriteTo(ObjectOutput)
.- Parameters:
input
- the stream to read.- Throws:
IOException
- if an error occurred during the I/O.ClassNotFoundException
- if it tries to load an undefined class.
-
setOrigin
-
supportedSince
NodeVersion supportedSince()Returns aNodeVersion
representing the Infinispan version in which this command was added. This value is used to ensure that when the cluster contains different Infinispan versions, only commands compatible with the oldest version are transmitted.Abstract classes should not implement this method as the version should be specific to an individual implementation. Similarly, implementations which extend another
ReplicableCommand
should always override this method.- Specified by:
supportedSince
in interfaceVersionAware
- Returns:
- a
NodeVersion
corresponding to the Infinispan version this command was added.
-