summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-05 04:27:58 (EST)
committerEike Stepper2008-01-05 04:27:58 (EST)
commiteab89b025de18585a8a830d8f7ab4c65bb081f55 (patch)
tree6373bb998d419d4abdcee71462f1e16d5904b39a
parent0ef6d7a921161bbcb048845899ae7bda0faa65ea (diff)
downloadcdo-eab89b025de18585a8a830d8f7ab4c65bb081f55.zip
cdo-eab89b025de18585a8a830d8f7ab4c65bb081f55.tar.gz
cdo-eab89b025de18585a8a830d8f7ab4c65bb081f55.tar.bz2
Cleanup
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
index 00a5a93..5dd3863 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
@@ -52,6 +52,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
/**
* @author Eike Stepper
@@ -77,7 +79,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
private Map<CDOID, CDOObject> dirtyObjects = new HashMap<CDOID, CDOObject>();
- private Map<CDOID, CDORevisionDelta> revisionDeltas = new HashMap<CDOID, CDORevisionDelta>();
+ private ConcurrentMap<CDOID, CDORevisionDelta> revisionDeltas = new ConcurrentHashMap<CDOID, CDORevisionDelta>();
private boolean dirty;
@@ -338,13 +340,9 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
}
}
- public void registerRevisionDelta(CDORevisionDelta delta)
+ public void registerRevisionDelta(CDORevisionDelta revisionDelta)
{
- CDORevisionDelta revisionDelta = revisionDeltas.get(delta.getID());
- if (revisionDelta == null)
- {
- revisionDeltas.put(delta.getID(), revisionDelta);
- }
+ revisionDeltas.putIfAbsent(revisionDelta.getID(), revisionDelta);
}
public void registerDirty(InternalCDOObject object, CDOFeatureDelta featureDelta)