You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Jerry Haltom <jh...@feedbackplusinc.com> on 2004/06/09 18:36:57 UTC

Donating to Commons Collections

I have written a pretty intense Table implementation (supporting named
and typed columns) that I would like to present to the Commons
Collections group for consideration.

The table is designed to support high volume, high read access
concurrency. In fact, it is thread safe without synchronization on row
lookups (row access is synchronized).

There are a few outstanding issues with it. Namely .compact() doesn't
function how I'd want it to (without external synchronization).
Additionally I'm going to implement indexes and the ability to create
filtered views (iterators?) on the data.

One of the design goals will be for it to be very lightweight... so all
of these features I add to it's allocation will be delayed until it is
actually needed.

Anyways, attached is the source code I have for it so far. Please take a
look at it.


The basic usage scenario is:

Class[] types = new Class[] { int.class, String.class };
String[] names = new String[] { "id", "name" };

Table t = new Table(types, names);
Table.Row row = t.newRow();
row.set("id", 12345);
row.set("name", "Joe");
row = t.newRow();
row.set("id", 54321);
row.set("name", "Bob");




Oh, primitives are handled efficiently. They are not wrapped/boxed.