Package org.infinispan.commands
Class RemoteCommandsFactory
- java.lang.Object
-
- org.infinispan.commands.RemoteCommandsFactory
-
public class RemoteCommandsFactory extends Object
Specifically used to create un-initializedReplicableCommand
s from a byte stream. This is aScopes.GLOBAL
component and doesn't have knowledge of initializing a command by injecting cache-specific components into it. Usually a second step to unmarshalling a command from a byte stream (after creating an un-initialized version using this factory) is to pass the command thoughCommandsFactory.initializeReplicableCommand(ReplicableCommand,boolean)
.- Since:
- 4.0
- Author:
- Manik Surtani, Mircea.Markus@jboss.com
- See Also:
CommandsFactory.initializeReplicableCommand(ReplicableCommand,boolean)
-
-
Constructor Summary
Constructors Constructor Description RemoteCommandsFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReplicableCommand
fromStream(byte id, byte type)
Creates an un-initialized command.org.infinispan.commands.remote.CacheRpcCommand
fromStream(byte id, byte type, ByteString cacheName)
Resolve anCacheRpcCommand
from the stream.
-
-
-
Method Detail
-
fromStream
public ReplicableCommand fromStream(byte id, byte type)
Creates an un-initialized command. Un-initialized in the sense that parameters will be set, but any components specific to the cache in question will not be set. You would typically set these parameters usingCommandsFactory.initializeReplicableCommand(ReplicableCommand,boolean)
- Parameters:
id
- id of the commandtype
- type of the command- Returns:
- a replicable command
-
fromStream
public org.infinispan.commands.remote.CacheRpcCommand fromStream(byte id, byte type, ByteString cacheName)
Resolve anCacheRpcCommand
from the stream.- Parameters:
id
- id of the commandtype
- type of command (whether internal or user defined)cacheName
- cache name at which this command is directed- Returns:
- an instance of
CacheRpcCommand
-
-