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.booleanIf true, a return value will be provided when performed remotely.Returns aNodeVersionrepresenting 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, waitMethods inherited from interface org.infinispan.commands.ReplicableCommand
getCommandId, isSuccessful, logThrowable, readFrom, setOrigin, writeToMethods 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:GlobalRpcCommandInvoke the command asynchronously.- Specified by:
invokeAsyncin interfaceGlobalRpcCommand- Throws:
Throwable
-
isReturnValueExpected
public boolean isReturnValueExpected()Description copied from interface:ReplicableCommandIf true, a return value will be provided when performed remotely. Otherwise, a remoteResponseGeneratormay choose to simply return null to save on marshalling costs.- Specified by:
isReturnValueExpectedin interfaceReplicableCommand- Returns:
- true or false
-
supportedSince
Description copied from interface:ReplicableCommandReturns aNodeVersionrepresenting 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
ReplicableCommandshould always override this method.- Specified by:
supportedSincein interfaceReplicableCommand- Specified by:
supportedSincein interfaceVersionAware- Returns:
- a
NodeVersioncorresponding to the Infinispan version this command was added.
-