Re: [jgroups-dev] Streamable
"Newcomb, Michael-P57487" <[email protected]>
| Newsgroups | gmane.comp.java.javagroups.devel |
|---|---|
| Message-ID | <[email protected]> |
It is mainly an ease of use issue. We just upgraded from 2.8.1 and our 2.6.x code logged some of the messages and sends some down a TCP stream for distant clients of the group. The old Message (< 2.8.1) was Externalizable. If you made Streamable use DataInput and DataOutput, you could make Message also be Externalizable and just forward Externalizable.readExternal and Externalizable.writeExternal to Streamable.readFrom and Streamable.writeTo since ObjectInput and ObjectOutput extend from DataInput and DataOutput. We may change this in the future, but I figured that using DataInput and DataOutput is probably a good idea anyway. I saw that in Util as well, because I was just going to make a local mod myself to see if it was that easy, then saw all those. I checked some of the Util calls and I don't think they use any of the Stream methods, but I did not do an exhaustive search. From: Vladimir Blagojevic [mailto:[email protected]] Sent: Thursday, May 20, 2010 2:49 PM To: Newcomb, Michael-P57487 Cc: jg-dev Subject: Re: [jgroups-dev] Streamable Yes, it seems doable. In fact I tried it. The only minor problem are casts in Util#objectFromStream and Util#objectToStream where we have to cast parameter DataInputStream into InputStream and DataOutputStram into OutputStream respectively. Lets see what Bela says about this. Any specific reason you need this change? On 2010-05-20, at 11:17 AM, Newcomb, Michael-P57487 wrote: Can you make Streamable use DataInput and DataOutput instead of DataInputStream and DataOutputStream? I think you would only lose flush() and size() from DataOutputStream. Thanks, Michael ------------------------------------------------------------------------ ------ _______________________________________________ Javagroups-development mailing list Vladimir Blagojevic JBoss Clustering Team JBoss by Red Hat ------------------------------------------------------------------------------ _______________________________________________ Javagroups-development mailing list