Hi,

On Wed, Jun 25, 2014 at 10:12 AM, Davide Giannella <dav...@apache.org> wrote:
> Any thoughts on the above?

I generally agree, as my thinking in the original thread was to have a
unified interface where (im)mutability was just an aspect of specific
instances/implementations.

On the other hand in many cases the strict distinctions between
mutable and immutable versions of content have proved quite useful in
proactively preventing problems. For example there's no need to worry
about unexpected concurrency problems or other complexities caused by
mutability in code that deals with NodeStates. Blurring that line
would make it such high-level reasoning about the behavior of
particular components harder.

The ReadOnlyBuilder adapter class exists as a simple way to enable
NodeBuilder-based code to be used also with NodeStates. For example it
is used with the OakDirectory class in oak-lucene for such a purpose.

BR,

Jukka Zitting

Reply via email to