<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 31 Mar 2009, at 11:16, Mircea Markus wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>Some thought on ReplicateCommand.<br>It is also used to replicate a single command, which is inefficient, as 2 objects are unnecessarily created: the ReplicateCommand itself and an array holding only one object.<br>Why not replicated the aggregated command directly?</div></blockquote><div><br></div><div>The actual command is replicated directly. &nbsp;See ReplicateCommand.getParameters(). &nbsp;There is just an extra int in the byte stream containing the number of commands contained.</div><br><blockquote type="cite"><div>Another thing about the name: even though it is correct, it sounds very much like ReplicableCommand. I suggest renaming to CompositeCommand, or ContainerCommand.<br>wdyt?</div></blockquote><div><br></div><div>Agreed about the name. &nbsp;Don't like CompositeCommand or ContainerCommand though, they both suggest a command that holds other commands. &nbsp;That is not this command's primary purpose. &nbsp;It's primary purpose is to "transport" a command across a network and execute the command on a remote cache. &nbsp;</div><div><br></div><div>So, the interface it implements is more appropriately named (CacheRPCCommand). &nbsp;Perhaps there should be 2 separate implementations, SingleRPCCommand, MultipleRPCCommand?</div><div><br></div><div><br></div></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div>Lead, JBoss Cache</div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a><br><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>