[infinispan-dev] StateTransferControlCommand initialisation?

Galder Zamarreno galder.zamarreno at redhat.com
Wed Mar 25 15:23:28 EDT 2009


Hi,

I'm looking at RemoteCommandFactory in Infinispan as part as mapping the 
marshalling stuff to JBoss Marshalling and here's something that has 
confused me:

fromStream() method says:

* 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.
* <p/>
* You would typically set these parameters using {@link 
org.infinispan.commands.CommandsFactory#initializeReplicableCommand(ReplicableCommand)}
* <p/>

And then you do the following:

          case StateTransferControlCommand.METHOD_ID:
             command = new StateTransferControlCommand();
             ((StateTransferControlCommand) command).init(rpcManager);
             break;

Shouldn't ((StateTransferControlCommand) command).init(rpcManager) go 
into 
org.infinispan.commands.CommandsFactory#initializeReplicableCommand(ReplicableCommand).

initializeReplicableCommand() javadoc says:

* Initializes a {@link org.infinispan.commands.ReplicableCommand} read from 
* a data stream with components specific to the target cache instance.

The rpcManager seems to be one those components?

Cheers,
-- 
Galder Zamarreño
Sr. Software Maintenance Engineer
JBoss, a division of Red Hat



More information about the infinispan-dev mailing list