Package org.eclipse.emf.spi.cdo

# Class DefaultCDOMerger.PerFeature.ManyValued

java.lang.Object
org.eclipse.emf.spi.cdo.DefaultCDOMerger
org.eclipse.emf.spi.cdo.DefaultCDOMerger.PerFeature
org.eclipse.emf.spi.cdo.DefaultCDOMerger.PerFeature.ManyValued

All Implemented Interfaces:
  `CDOMerger`, `CDOMergerBaseAware`

Direct Known Subclasses:
  `DefaultCDOMerger.PerFeature.ManyValuedOld`

Enclosing class:
  `DefaultCDOMerger.PerFeature`

public static class DefaultCDOMerger.PerFeature.ManyValued extends DefaultCDOMerger.PerFeature
Per-feature merger whose many-valued path performs a semantic three-way list merge.

Incoming numeric CDO histories are decoded independently against result-base occurrence identities plus each side's own causal base visibility. ADD creates a side-local occurrence, SET creates a replacement in the addressed lineage, MOVE preserves occurrence identity and creates a historical placement landmark, and REMOVE/CLEAR/UNSET address the occurrences visible at that point in the causal history. Historical positions and their partial order remain available after an occurrence moves or disappears.

Numeric indexes are intentionally confined to decoding and final delta encoding. Normalization, dimension-wise presence/content/placement merging, uniqueness resolution, and deterministic linearization reason about stable occurrences and ordering constraints. A fresh engine contains all mutable state for each invocation, so merger instances remain safely reusable under `DefaultCDOMerger.merge(CDOChangeSet, CDOChangeSet)` synchronization. Semantic variability is intentionally confined to five independent policy domains: occurrence conflicts, topological ordering ambiguity, uniqueness/duplicate resolution, CLEAR semantics, and UNSET semantics. Policies choose only alternatives validated by the semantic engine; they cannot mutate decoded histories or weaken hard identity, ordering, uniqueness, set-state, or determinism invariants.

Author:
  Eike Stepper

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`DefaultCDOMerger.PerFeature.ManyValued.ClearSemanticPolicy`
Immutable policy for the semantic scope of an effective CLEAR operation.
`static enum`
`DefaultCDOMerger.PerFeature.ManyValued.DuplicateResolutionPolicy`
Immutable policy for hard uniqueness collisions between distinct surviving occurrences.
`static enum`
`DefaultCDOMerger.PerFeature.ManyValued.OccurrenceConflictPolicy`
Immutable policy for genuinely incompatible changes to one ancestor occurrence lineage.
`static enum`
`DefaultCDOMerger.PerFeature.ManyValued.OrderingPolicy`
Immutable policy used only when the final position DAG has multiple simultaneously eligible occurrences.
`static enum`
`DefaultCDOMerger.PerFeature.ManyValued.UnsetSemanticPolicy`
Immutable policy for an effective UNSET that cannot coexist with concurrent effective mutation.

## Nested classes/interfaces inherited from class org.eclipse.emf.spi.cdo.DefaultCDOMerger.PerFeature

`DefaultCDOMerger.PerFeature.ManyValued, DefaultCDOMerger.PerFeature.ManyValuedOld`

## Nested classes/interfaces inherited from class org.eclipse.emf.spi.cdo.DefaultCDOMerger

`DefaultCDOMerger.ChangedInSourceAndDetachedInTargetConflict, DefaultCDOMerger.ChangedInSourceAndTargetConflict, DefaultCDOMerger.ChangedInTargetAndDetachedInSourceConflict, DefaultCDOMerger.Conflict, DefaultCDOMerger.PerFeature, DefaultCDOMerger.ResolutionPreference`

## Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.transaction.CDOMerger

`CDOMerger.ConflictException`

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`ManyValued()`
Creates a merger with the documented semantic defaults.
``
`ManyValued(DefaultCDOMerger.ResolutionPreference resolutionPreference)`
`protected`
`ManyValued(DefaultCDOMerger.ResolutionPreference resolutionPreference, DefaultCDOMerger.PerFeature.ManyValued.OccurrenceConflictPolicy occurrenceConflictPolicy, DefaultCDOMerger.PerFeature.ManyValued.OrderingPolicy orderingPolicy, DefaultCDOMerger.PerFeature.ManyValued.DuplicateResolutionPolicy duplicateResolutionPolicy, DefaultCDOMerger.PerFeature.ManyValued.ClearSemanticPolicy clearSemanticPolicy, DefaultCDOMerger.PerFeature.ManyValued.UnsetSemanticPolicy unsetSemanticPolicy)`
Creates an immutable semantic-policy profile for an extender without adding mutable global configuration.

## Method Summary

Modifier and Type
Method
Description
`protected CDOFeatureDelta`
`changedInSource(CDOFeatureDelta featureDelta, CDORevision resultBaseRevision, CDORevision targetBaseRevision, CDORevision sourceBaseRevision)`
Re-encodes a source-only feature change relative to the actual result base.
`protected CDOFeatureDelta`
`changedInSourceAndTarget(CDOFeatureDelta targetFeatureDelta, CDOFeatureDelta sourceFeatureDelta, CDORevision ancestorRevision)`
Resolves two concurrent list histories that start from one common ancestor.
`protected CDOFeatureDelta`
`changedInSourceAndTarget(CDOFeatureDelta targetFeatureDelta, CDOFeatureDelta sourceFeatureDelta, CDORevision resultBaseRevision, CDORevision targetBaseRevision, CDORevision sourceBaseRevision)`
Resolves concurrent feature changes with explicit result/target/source base revisions.
`protected CDOFeatureDelta`
`changedInTarget(CDOFeatureDelta featureDelta, CDORevision resultBaseRevision, CDORevision targetBaseRevision, CDORevision sourceBaseRevision)`
Re-encodes a target-only feature change relative to the actual result base.
`protected boolean`
`treatAsUnique(EStructuralFeature feature)`

### Methods inherited from class org.eclipse.emf.spi.cdo.DefaultCDOMerger.PerFeature

`changedInSource, changedInSource, changedInSourceAndTarget, changedInSourceAndTarget, changedInSourceAndTarget, changedInSourceAndTarget, changedInSourceAndTargetManyValued, changedInSourceAndTargetSingleValued, changedInTarget, changedInTarget`

### Methods inherited from class org.eclipse.emf.spi.cdo.DefaultCDOMerger

`addedInSource, addedInSourceAndTarget, addedInTarget, changedInSource, changedInSourceAndDetachedInTarget, changedInSourceAndDetachedInTarget, changedInTarget, changedInTargetAndDetachedInSource, changedInTargetAndDetachedInSource, detachedInSource, detachedInSourceAndTarget, detachedInTarget, getConflicts, getListOrdering, getResolutionPreference, getResult, getSourceMap, getTargetMap, merge, merge, merge, merge, merge, merge`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ManyValued

public ManyValued()
Creates a merger with the documented semantic defaults.

### ManyValued

public ManyValued(DefaultCDOMerger.ResolutionPreference resolutionPreference)

Since:
  4.2

### ManyValued

protected ManyValued(DefaultCDOMerger.ResolutionPreference resolutionPreference, DefaultCDOMerger.PerFeature.ManyValued.OccurrenceConflictPolicy occurrenceConflictPolicy, DefaultCDOMerger.PerFeature.ManyValued.OrderingPolicy orderingPolicy, DefaultCDOMerger.PerFeature.ManyValued.DuplicateResolutionPolicy duplicateResolutionPolicy, DefaultCDOMerger.PerFeature.ManyValued.ClearSemanticPolicy clearSemanticPolicy, DefaultCDOMerger.PerFeature.ManyValued.UnsetSemanticPolicy unsetSemanticPolicy)
Creates an immutable semantic-policy profile for an extender without adding mutable global configuration. Policy outputs remain centrally validated by the engine and cannot relax occurrence, ordering, uniqueness, or set-state invariants.

Since:
  4.30

## Method Details

### treatAsUnique

protected boolean treatAsUnique(EStructuralFeature feature)

Since:
  4.2

### changedInTarget

protected CDOFeatureDelta changedInTarget(CDOFeatureDelta featureDelta, CDORevision resultBaseRevision, CDORevision targetBaseRevision, CDORevision sourceBaseRevision)
Description copied from class: `DefaultCDOMerger.PerFeature`
Re-encodes a target-only feature change relative to the actual result base. Single-valued deltas are absolute and therefore already base-independent; many-valued subclasses override this hook.

Overrides:
  `changedInTarget` in class `DefaultCDOMerger.PerFeature`

### changedInSource

protected CDOFeatureDelta changedInSource(CDOFeatureDelta featureDelta, CDORevision resultBaseRevision, CDORevision targetBaseRevision, CDORevision sourceBaseRevision)
Description copied from class: `DefaultCDOMerger.PerFeature`
Re-encodes a source-only feature change relative to the actual result base. Single-valued deltas are absolute and therefore already base-independent; many-valued subclasses override this hook.

Overrides:
  `changedInSource` in class `DefaultCDOMerger.PerFeature`

### changedInSourceAndTarget

protected CDOFeatureDelta changedInSourceAndTarget(CDOFeatureDelta targetFeatureDelta, CDOFeatureDelta sourceFeatureDelta, CDORevision ancestorRevision)
Resolves two concurrent list histories that start from one common ancestor.

The ordinary `DefaultCDOMerger.merge(CDOChangeSet, CDOChangeSet)` path reaches this overload. It must therefore enter the semantic list merger with the same revision in all three base roles. The five-argument overload below is deliberately reserved for the branch/remerge path, where the two histories can have different causal bases and the result is encoded relative to a third revision.

Overrides:
  `changedInSourceAndTarget` in class `DefaultCDOMerger.PerFeature`

### changedInSourceAndTarget

protected CDOFeatureDelta changedInSourceAndTarget(CDOFeatureDelta targetFeatureDelta, CDOFeatureDelta sourceFeatureDelta, CDORevision resultBaseRevision, CDORevision targetBaseRevision, CDORevision sourceBaseRevision)
Description copied from class: `DefaultCDOMerger.PerFeature`
Resolves concurrent feature changes with explicit result/target/source base revisions. The default preserves the existing common-ancestor hook for extenders that do not need asymmetric list visibility.

Overrides:
  `changedInSourceAndTarget` in class `DefaultCDOMerger.PerFeature`