commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerry Haltom <jhal...@feedbackplusinc.com>
Subject Donating to Commons Collections
Date Wed, 09 Jun 2004 16:36:57 GMT
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.


Mime
View raw message