[concurrency-interest] CopyOnWrite*

Doug Lea dl@cs.oswego.edu
Sat, 17 Aug 2002 10:07:20 -0400


Larry Riedel wrote:

> Nobody asked me, but since it appears there may
> be CopyOnWriteArrayList and CopyOnWriteArraySet in
> java.util.concurrent, I thought it might be a good
> excuse to say I would love a CopyOnWriteByteBuffer,
> or a CopyOnWriteByteArray which is essentially just
> a COW wrapper for a byte[].  

I don't see what kind of API you have in mind here.
Could you flesh this out? 

> I have no justification
> related to concurrency, but I do not see why those
> other classes need to be there either. :-)

The intent is for java.util.concurrent to supply classes that are
frequently needed in concurrent programs.  The CopyOnWriteArray*
classes are useful in concurrent programs dealing with event
multicast, observers, etc, but are essentially never useful in
non-concurrent programs.

-Doug