Class ReplicableManagerFunctionCommand
java.lang.Object
org.infinispan.manager.impl.ReplicableManagerFunctionCommand
- All Implemented Interfaces:
GlobalRpcCommand
,ReplicableCommand
,TracedCommand
,VersionAware
@ProtoTypeId(1161)
public class ReplicableManagerFunctionCommand
extends Object
implements GlobalRpcCommand
Replicable Command that runs the given Function passing the
EmbeddedCacheManager
as an argument- Since:
- 8.2
- Author:
- wburns
-
Constructor Summary
ConstructorsConstructorDescriptionReplicableManagerFunctionCommand
(Function<? super EmbeddedCacheManager, ?> function, Subject subject) -
Method Summary
Modifier and TypeMethodDescriptioninvokeAsync
(GlobalComponentRegistry globalComponentRegistry) Invoke the command asynchronously.boolean
If true, a return value will be provided when performed remotely.Returns aNodeVersion
representing the Infinispan version in which this command was added.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.commands.ReplicableCommand
getCommandId, isSuccessful, logThrowable, readFrom, setOrigin, writeTo
Methods inherited from interface org.infinispan.commands.TracedCommand
getOperationName, getSpanAttributes, setSpanAttributes
-
Constructor Details
-
ReplicableManagerFunctionCommand
public ReplicableManagerFunctionCommand(Function<? super EmbeddedCacheManager, ?> function, Subject subject)
-
-
Method Details
-
invokeAsync
public CompletableFuture<Object> invokeAsync(GlobalComponentRegistry globalComponentRegistry) throws Throwable Description copied from interface:GlobalRpcCommand
Invoke the command asynchronously.- Specified by:
invokeAsync
in interfaceGlobalRpcCommand
- Throws:
Throwable
-
isReturnValueExpected
public boolean isReturnValueExpected()Description copied from interface:ReplicableCommand
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.- Specified by:
isReturnValueExpected
in interfaceReplicableCommand
- Returns:
- true or false
-
supportedSince
Description copied from interface:ReplicableCommand
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 interfaceReplicableCommand
- Specified by:
supportedSince
in interfaceVersionAware
- Returns:
- a
NodeVersion
corresponding to the Infinispan version this command was added.
-