New collections
by Manik Surtani
Guys,
I have created 3 new collection impls in trunk - ImmutableListCopy,
ImmutableSetCopy and ImmutableMapCopy. I have also ported the first 2
to branch 2.2.x (the reason why I didnt port the third is because the
MapCopy which it replaces can get serialized and I don't want to break
binary compat).
See the Javadoc of these classes for more details, but in a nutshell
these are very efficient alternatives to the "immutable and
defensively copied" idiom. I.e., if you ever find yourself doing:
return Collections.unmodifiableList(new ArrayList(internalList))
you should consider ImmutableListCopy instead. Constructon time is
about a tenth of the combined time it takes to create an ArrayList and
then wrap it in an UnmodifiableList. Also, iteration is very quick
since the internal array is immutable. Please keep this in mind when
working on JBC code.
Cheers,
--
Manik Surtani
Lead, JBoss Cache
manik(a)jboss.org
16 years, 3 months
Batching API
by Manik Surtani
... is done!
Have a look at Cache.startBatch() and Cache.endBatch() on trunk, the
javadocs should explain all.
Feedback appreciated.
Cheers
Manik
--
Manik Surtani
Lead, JBoss Cache
manik(a)jboss.org
16 years, 3 months
3.0.0.Alpha2...
by Manik Surtani
... is out. Enjoy!
--
Manik Surtani
Lead, JBoss Cache
manik(a)jboss.org
16 years, 3 months