Class RemoteCommandsFactory


  • public class RemoteCommandsFactory
    extends Object
    Specifically used to create un-initialized ReplicableCommands from a byte stream. This is a Scopes.GLOBAL component and doesn't have knowledge of initializing a command by injecting cache-specific components into it.
    Since:
    4.0
    Author:
    Manik Surtani, Mircea.Markus@jboss.com
    • Constructor Detail

      • RemoteCommandsFactory

        public RemoteCommandsFactory()
    • 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.
        Parameters:
        id - id of the command
        type - type of the command
        Returns:
        a replicable command
      • fromStream

        public CacheRpcCommand fromStream​(byte id,
                                          byte type,
                                          ByteString cacheName)
        Resolve an CacheRpcCommand from the stream.
        Parameters:
        id - id of the command
        type - type of command (whether internal or user defined)
        cacheName - cache name at which this command is directed
        Returns:
        an instance of CacheRpcCommand