Package org.infinispan.commands.module
Interface ModuleCommandFactory
-
public interface ModuleCommandFactoryModules which wish to implement their own commands and visitors must also provide an implementation of this interface.Note that this is a
Scopes.GLOBALcomponent and as such cannot haveInjectmethods referring toScopes.NAMED_CACHEscoped components. For such components, use a correspondingScopes.NAMED_CACHE-scopedModuleCommandInitializer.- Since:
- 5.0
- Author:
- Manik Surtani
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReplicableCommandfromStream(byte commandId)Construct and initialize aReplicableCommandbased on the command id.CacheRpcCommandfromStream(byte commandId, ByteString cacheName)Construct and initialize aCacheRpcCommandbased on the command id.Map<Byte,Class<? extends ReplicableCommand>>getModuleCommands()Provides a map of command IDs to command types of all the commands handled by the command factory instance.
-
-
-
Method Detail
-
getModuleCommands
Map<Byte,Class<? extends ReplicableCommand>> getModuleCommands()
Provides a map of command IDs to command types of all the commands handled by the command factory instance. Unmarshalling requests for these command IDs will be dispatched to this implementation.- Returns:
- map of command IDs to command types handled by this implementation.
-
fromStream
ReplicableCommand fromStream(byte commandId)
Construct and initialize aReplicableCommandbased on the command id.- Parameters:
commandId- command id to construct- Returns:
- a ReplicableCommand
-
fromStream
CacheRpcCommand fromStream(byte commandId, ByteString cacheName)
Construct and initialize aCacheRpcCommandbased on the command id.- Parameters:
commandId- command id to constructcacheName- cache name at which command to be created is directed- Returns:
- a
CacheRpcCommand
-
-