org.eclipse.emf.spi.cdo
Class AbstractObjectConflictResolver.ThreeWayMerge

java.lang.Object
  extended by org.eclipse.emf.spi.cdo.AbstractConflictResolver
      extended by org.eclipse.emf.spi.cdo.AbstractObjectConflictResolver
          extended by org.eclipse.emf.spi.cdo.AbstractObjectConflictResolver.ThreeWayMerge
All Implemented Interfaces:
CDOConflictResolver, CDOConflictResolver2, CDOAdapterPolicy
Direct Known Subclasses:
AbstractObjectConflictResolver.MergeLocalChangesPerFeature
Enclosing class:
AbstractObjectConflictResolver

public abstract static class AbstractObjectConflictResolver.ThreeWayMerge
extends AbstractObjectConflictResolver
implements CDOAdapterPolicy

Since:
2.0

Nested Class Summary
static class AbstractObjectConflictResolver.ThreeWayMerge.RevisionDeltaCollector
           
 
Nested classes/interfaces inherited from class org.eclipse.emf.spi.cdo.AbstractObjectConflictResolver
AbstractObjectConflictResolver.MergeLocalChangesPerFeature, AbstractObjectConflictResolver.TakeRemoteChangesThenApplyLocalChanges, AbstractObjectConflictResolver.ThreeWayMerge
 
Field Summary
 
Fields inherited from interface org.eclipse.emf.cdo.view.CDOAdapterPolicy
ALL, CDO, NONE
 
Constructor Summary
AbstractObjectConflictResolver.ThreeWayMerge()
           
 
Method Summary
protected  void hookTransaction(CDOTransaction transaction)
           
 boolean isValid(EObject object, Adapter adapter)
          Returns true if the given adapter on the given object should trigger a certain operation or behaviour, false otherwise.
protected  void resolveConflict(CDOObject conflict, CDORevision oldRemoteRevision, CDORevisionDelta localDelta, CDORevisionDelta remoteDelta, List<CDORevisionDelta> allRemoteDeltas)
          Resolves the conflict of a single object in the current transaction.
protected abstract  void resolveConflict(CDOObject conflict, CDORevisionDelta localDelta, List<CDORevisionDelta> remoteDeltas)
           
 void resolveConflicts(Set<CDOObject> conflicts)
          Resolves conflicts after remote invalidations arrived for objects that are locally dirty or detached.
protected  void unhookTransaction(CDOTransaction transaction)
           
 
Methods inherited from class org.eclipse.emf.spi.cdo.AbstractObjectConflictResolver
changeObject, readObject, resolveConflict, resolveConflicts, rollbackObject
 
Methods inherited from class org.eclipse.emf.spi.cdo.AbstractConflictResolver
getTransaction, setTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.cdo.transaction.CDOConflictResolver
getTransaction, setTransaction
 

Constructor Detail

AbstractObjectConflictResolver.ThreeWayMerge

public AbstractObjectConflictResolver.ThreeWayMerge()
Method Detail

isValid

public boolean isValid(EObject object,
                       Adapter adapter)
Description copied from interface: CDOAdapterPolicy
Returns true if the given adapter on the given object should trigger a certain operation or behaviour, false otherwise.

Specified by:
isValid in interface CDOAdapterPolicy
See Also:
CDOView.Options.addChangeSubscriptionPolicy(CDOAdapterPolicy), CDOView.Options.setStrongReferencePolicy(CDOAdapterPolicy)

hookTransaction

protected void hookTransaction(CDOTransaction transaction)
Overrides:
hookTransaction in class AbstractConflictResolver

unhookTransaction

protected void unhookTransaction(CDOTransaction transaction)
Overrides:
unhookTransaction in class AbstractConflictResolver

resolveConflicts

public void resolveConflicts(Set<CDOObject> conflicts)
Description copied from interface: CDOConflictResolver
Resolves conflicts after remote invalidations arrived for objects that are locally dirty or detached.

Specified by:
resolveConflicts in interface CDOConflictResolver
Overrides:
resolveConflicts in class AbstractObjectConflictResolver

resolveConflict

protected void resolveConflict(CDOObject conflict,
                               CDORevision oldRemoteRevision,
                               CDORevisionDelta localDelta,
                               CDORevisionDelta remoteDelta,
                               List<CDORevisionDelta> allRemoteDeltas)
Description copied from class: AbstractObjectConflictResolver
Resolves the conflict of a single object in the current transaction. Depending on the decision taken to resolve the conflict, it may be necessary to adjust the notification that will be sent to the adapters in the current transaction. This can be achieved by adjusting the CDORevisionDelta in deltas.

Overrides:
resolveConflict in class AbstractObjectConflictResolver

resolveConflict

protected abstract void resolveConflict(CDOObject conflict,
                                        CDORevisionDelta localDelta,
                                        List<CDORevisionDelta> remoteDeltas)


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.