[infinispan-dev] Re: StateTransferControlCommand initialisation?

Galder Zamarreno galder.zamarreno at redhat.com
Wed Mar 25 15:27:37 EDT 2009


To clarify, where this initialization is located has impact in the JBoss 
Marshalling based implementation I'm working on. If the initialisation 
has to be where it is at the moment, I need to get that through to the 
Externalizer implementation that will create instances of 
ReplicableCommand subclasses. Otherwise, if it can go 
org.infinispan.commands.CommandsFactory#initializeReplicableCommand(ReplicableCommand)}, 
I don't have to worry about it and can leave it to 
Infinispan.CommandsFactory to deal with it.

Galder Zamarreno wrote:
> 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