summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2010-01-20 05:23:19 (EST)
committerCaspar De Groot2010-01-20 05:23:19 (EST)
commit4534fa61ae3476fa947aac71ed78d16b863980cd (patch)
tree3db4cd66c73e1b3a812dbcd1be48b7fdfadafb82
parent79c5e504e83abe293e8aa559620c19ceede446cd (diff)
downloadcdo-4534fa61ae3476fa947aac71ed78d16b863980cd.zip
cdo-4534fa61ae3476fa947aac71ed78d16b863980cd.tar.gz
cdo-4534fa61ae3476fa947aac71ed78d16b863980cd.tar.bz2
[270716] Provide support for branching
https://bugs.eclipse.org/bugs/show_bug.cgi?id=270716
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java27
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java8
3 files changed, 19 insertions, 19 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
index f596c11..aa9070c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
@@ -562,9 +562,10 @@ public abstract class CDOSessionImpl extends Container<CDOView> implements Inter
* @since 2.0
*/
public void handleSyncResponse(CDOBranchPoint branchPoint, Collection<CDOPackageUnit> newPackageUnits,
- Set<CDOIDAndVersion> dirtyOIDs, Collection<CDOID> detachedObjects)
+ Set<CDOIDAndVersion> dirtyOIDandVersions, Collection<CDOID> detachedObjects)
{
- handleCommitNotification(branchPoint, newPackageUnits, dirtyOIDs, detachedObjects, null, null, true, false);
+ handleCommitNotification(branchPoint, newPackageUnits, dirtyOIDandVersions, detachedObjects, null, null, true,
+ false);
}
public void handleBranchNotification(InternalCDOBranch branch)
@@ -576,15 +577,15 @@ public abstract class CDOSessionImpl extends Container<CDOView> implements Inter
* @since 2.0
*/
public void handleCommitNotification(CDOBranchPoint branchPoint, Collection<CDOPackageUnit> newPackageUnits,
- Set<CDOIDAndVersion> dirtyOIDs, Collection<CDOID> detachedObjects, Collection<CDORevisionDelta> deltas,
+ Set<CDOIDAndVersion> dirtyOIDandVersions, Collection<CDOID> detachedOIDs, Collection<CDORevisionDelta> deltas,
InternalCDOView excludedView)
{
- handleCommitNotification(branchPoint, newPackageUnits, dirtyOIDs, detachedObjects, deltas, excludedView, options()
- .isPassiveUpdateEnabled(), true);
+ handleCommitNotification(branchPoint, newPackageUnits, dirtyOIDandVersions, detachedOIDs, deltas, excludedView,
+ options().isPassiveUpdateEnabled(), true);
}
private void handleCommitNotification(CDOBranchPoint branchPoint, final Collection<CDOPackageUnit> newPackageUnits,
- Set<CDOIDAndVersion> dirtyOIDs, final Collection<CDOID> detachedObjects,
+ Set<CDOIDAndVersion> dirtyOIDandVersions, final Collection<CDOID> detachedOIDs,
final Collection<CDORevisionDelta> deltas, InternalCDOView excludedView, final boolean passiveUpdate,
final boolean async)
{
@@ -597,13 +598,13 @@ public abstract class CDOSessionImpl extends Container<CDOView> implements Inter
{
if (passiveUpdate)
{
- reviseRevisions(branchPoint, dirtyOIDs, detachedObjects, excludedView);
+ reviseRevisions(branchPoint, dirtyOIDandVersions, detachedOIDs, excludedView);
}
- final Set<CDOIDAndVersion> finalDirtyOIDs = Collections.unmodifiableSet(dirtyOIDs);
- final Collection<CDOID> finalDetachedObjects = Collections.unmodifiableCollection(detachedObjects);
+ final Set<CDOIDAndVersion> finalDirtyOIDandVersions = Collections.unmodifiableSet(dirtyOIDandVersions);
+ final Collection<CDOID> finalDetachedOIDs = Collections.unmodifiableCollection(detachedOIDs);
final boolean skipChangeSubscription = (deltas == null || deltas.size() <= 0)
- && (detachedObjects == null || detachedObjects.size() <= 0);
+ && (detachedOIDs == null || detachedOIDs.size() <= 0);
for (final InternalCDOView view : getViews())
{
@@ -618,12 +619,12 @@ public abstract class CDOSessionImpl extends Container<CDOView> implements Inter
Set<CDOObject> conflicts = null;
if (passiveUpdate)
{
- conflicts = view.handleInvalidation(timeStamp, finalDirtyOIDs, finalDetachedObjects);
+ conflicts = view.handleInvalidation(timeStamp, finalDirtyOIDandVersions, finalDetachedOIDs);
}
if (!skipChangeSubscription)
{
- view.handleChangeSubscription(deltas, detachedObjects);
+ view.handleChangeSubscription(deltas, detachedOIDs);
}
if (conflicts != null)
@@ -697,7 +698,7 @@ public abstract class CDOSessionImpl extends Container<CDOView> implements Inter
}
setLastUpdateTime(timeStamp);
- fireInvalidationEvent(branchPoint, newPackageUnits, dirtyOIDs, detachedObjects, excludedView);
+ fireInvalidationEvent(branchPoint, newPackageUnits, dirtyOIDandVersions, detachedOIDs, excludedView);
}
public void reviseRevisions(CDOBranchPoint branchPoint, Set<CDOIDAndVersion> dirtyOIDs,
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
index 44bf131..f1bf931 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
@@ -404,9 +404,8 @@ public class CDOViewImpl extends Lifecycle implements InternalCDOView
if (idAndVersionAndBranch == null)
{
CDOID cdoID = object.cdoID();
- int branchID = object.cdoRevision().getBranch().getID();
int version = CDORevision.UNSPECIFIED_VERSION;
- CDOIDAndVersionAndBranch ivb = CDOIDUtil.createIDAndVersionAndBranch(cdoID, version, branchID);
+ CDOIDAndVersionAndBranch ivb = CDOIDUtil.createIDAndVersionAndBranch(cdoID, version, getBranch().getID());
uniqueObjects.put(object.cdoID(), ivb);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
index 89cfacf..09e16c9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
@@ -119,20 +119,20 @@ public interface InternalCDOSession extends CDOSession, PackageProcessor, Packag
* @since 3.0
*/
public void handleCommitNotification(CDOBranchPoint branchPoint, Collection<CDOPackageUnit> newPackageUnits,
- Set<CDOIDAndVersion> dirtyOIDs, Collection<CDOID> detachedObjects, Collection<CDORevisionDelta> deltas,
+ Set<CDOIDAndVersion> dirtyOIDandVersions, Collection<CDOID> detachedOIDs, Collection<CDORevisionDelta> deltas,
InternalCDOView excludedView);
/**
* @since 3.0
*/
public void handleSyncResponse(CDOBranchPoint branchPoint, Collection<CDOPackageUnit> newPackageUnits,
- Set<CDOIDAndVersion> dirtyOIDs, Collection<CDOID> detachedObjects);
+ Set<CDOIDAndVersion> dirtyOIDandVersions, Collection<CDOID> detachedOIDs);
/**
* In some cases we need to sync without propagating event. Lock is a good example.
*
* @since 3.0
*/
- public void reviseRevisions(CDOBranchPoint branchPoint, Set<CDOIDAndVersion> dirtyOIDs,
- Collection<CDOID> detachedObjects, InternalCDOView excludedView);
+ public void reviseRevisions(CDOBranchPoint branchPoint, Set<CDOIDAndVersion> dirtyOIDandVersions,
+ Collection<CDOID> detachedOIDs, InternalCDOView excludedView);
}