Package org.infinispan.commands.module
Interface ModuleCommandFactory
-
public interface ModuleCommandFactory
Modules which wish to implement their own commands and visitors must also provide an implementation of this interface.Note that this is a
Scopes.GLOBAL
component and as such cannot haveInject
methods referring toScopes.NAMED_CACHE
scoped 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 ReplicableCommand
fromStream(byte commandId)
Construct and initialize aReplicableCommand
based on the command id.CacheRpcCommand
fromStream(byte commandId, ByteString cacheName)
Construct and initialize aCacheRpcCommand
based 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 aReplicableCommand
based on the command id.- Parameters:
commandId
- command id to construct- Returns:
- a ReplicableCommand
-
fromStream
CacheRpcCommand fromStream(byte commandId, ByteString cacheName)
Construct and initialize aCacheRpcCommand
based on the command id.- Parameters:
commandId
- command id to constructcacheName
- cache name at which command to be created is directed- Returns:
- a
CacheRpcCommand
-
-