Project

General

Profile

Actions

Bug #2248

closed

Need to merge corresponding mutable and immutable subclasses of DomainObject

Added by Timothy McPhillips about 19 years ago. Updated almost 19 years ago.

Status:
Resolved
Priority:
Normal
Category:
core
Target version:
Start date:
11/05/2005
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2248

Description

In alpha7, complex, domain-specific objects passed between actors in
collection-oriented workflows were implemented in mutable and immutable pairs,
analogous to Java's StringBuffer and String classes. By convention, only
instances of the immutable versions of these class (which could be constructed
from instances of the mutable versions) were passed between actors. This
approach now appears to be overly complicated.

This issue has been addressed, for now, by adding two methods to the
DomainObject interface (and skeletal implementation): setWriteLock() and
assertNotWriteLocked(). The former method is called automatically when a
DomainObject is added to a collection. By convention, the latter method should
be called from all public methods of domain objects that change the state of the
instance; a runtime exception is then thrown if setWriteLock() was previously
called on that instance.

(The previous approach still may be used in cases where it makes sense.)

So far, the following pairs of classes have been merged:

CharacterMatrix, CharacterMatrixBuffer
DistanceMatrix, DistanceMatrixBuffer
WeightVector, WeightVectorBuffer
ProteinAtom, ProteinAtomBuffer
ProteinSequence, ProteinSequenceBuffer

The following pairs of classes still need to be merged:

Tree, TreeBuffer
TreeNode, TreeNodeBuffer

Actions #1

Updated by Timothy McPhillips almost 19 years ago

The classes Tree and TreeBuffer have been merged, as have TreeNode and
TreeNodeBuffer.

Actions #2

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 2248

Actions

Also available in: Atom PDF