[jbosscache-dev] Re: Integrating steaming transfer in JBC

Brian Stansberry brian.stansberry at jboss.com
Tue Aug 15 14:20:25 EDT 2006


Vladimir Blagojevic wrote:
> Is it not that whenever you close OIS#1 (as you do in step 3)
> close call is passed to underlying inputstream which would
> close actual tcp inputstream passed up by jgroups layer? 

Yep.

> We need some "end of in-memory state" marker?
>

Yes, definitely.  The in-memory state is a series of NodeData objects,
written one after another, not encapsulated in an array or list or
anything.  Persistent state is the same thing.  So you'd need some sort
of marker to tell the integrator when the in-memory state is finished.

>> 
>> I was thinking there might be an issue with this:
>> 
>> 1) StateTransferIntegrator gets InputStream IS from the JGroups
>> layer. 2) Uses it to create ObjectInputStream OIS#1.  Uses that to
>> read off the in-memory state and any marker we insert in the stream.
>> 3) Closes OIS#1. 4) Passes IS to the cache loader.
>> 5) Cacheloader creates ObjectInputStream OIS#2 from IS. Reads the
>> persistent state. 
>> 
>> Maybe that will work fine; it would be good if it did as it allows
>> for a more flexible API.




More information about the jbosscache-dev mailing list