[jboss-dev-forums] [Design of JBoss Serialization] - Re: What should I create to frequently ask it for smart clon
clebert.suconic@jboss.com
do-not-reply at jboss.com
Mon Aug 28 14:40:08 EDT 2006
DataContainer can't be multi-thread because ObjectsCache and the hashmap of read objects is stored inside DataContainer.
However, look at this:
http://jira.jboss.org/jira/browse/JBSER-88
Just created a new method on DataContainer called .cloneContainer.
You can have a DataContainer per thread with this, reusing the ArrayList underneath DataContainer used to store the data. You would minimize GC with this factory pattern.
Although you will have to use CVS for a while.
Take a look on org.jboss.serial.soaktest.DataContainerMultiThreadTestCase.
DataContainer is being cloned and reused among 100 threads, each thread reading 100 times the same object. All having a single source.
So... I created the feature just for you (as it was simple creating it). As an exchange now, can you provide me what would be a nice UseCase? :-)
Clebert Suconic
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967895#3967895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967895
More information about the jboss-dev-forums
mailing list