Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-12-17 04:00:55 -0500
committerEike Stepper2006-12-17 04:00:55 -0500
commitb09c1d9d15f34a6951514ead4744207316281174 (patch)
tree2af0d629833ff024ee093503a46caf67d0ccc423 /plugins/org.eclipse.net4j
parentfb48550aacf08f7a327a0699ce35ac64a38c1f0c (diff)
downloadcdo-b09c1d9d15f34a6951514ead4744207316281174.tar.gz
cdo-b09c1d9d15f34a6951514ead4744207316281174.tar.xz
cdo-b09c1d9d15f34a6951514ead4744207316281174.zip
*** empty log message ***
Diffstat (limited to 'plugins/org.eclipse.net4j')
-rw-r--r--plugins/org.eclipse.net4j/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java30
2 files changed, 13 insertions, 18 deletions
diff --git a/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
index c31d41117e..dea782a1a0 100644
--- a/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
@@ -28,6 +28,7 @@ Export-Package: org.eclipse.internal.net4j.transport;version="0.8.0",
org.eclipse.net4j.util.om.log;version="0.8.0",
org.eclipse.net4j.util.om.trace;version="0.8.0",
org.eclipse.net4j.util.registry;version="0.8.0",
+ org.eclipse.net4j.util.registry.delegating;version="0.8.0",
org.eclipse.net4j.util.stream;version="0.8.0"
Eclipse-LazyStart: true
Require-Bundle: org.eclipse.core.runtime;resolution:=optional
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java
index 93b8691f7e..8b8c8084a7 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java
@@ -108,11 +108,7 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
public synchronized V put(K key, V value)
{
V result = getTransaction().put(key, value);
- if (autoCommit)
- {
- commit();
- }
-
+ autoCommit();
return result;
}
@@ -132,10 +128,7 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
transaction.put(e.getKey(), e.getValue());
}
- if (autoCommit)
- {
- commit();
- }
+ autoCommit();
}
}
@@ -146,11 +139,7 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
public synchronized V remove(Object key)
{
V result = getTransaction().remove(key);
- if (autoCommit)
- {
- commit();
- }
-
+ autoCommit();
return result;
}
@@ -169,10 +158,7 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
transaction.remove(key);
}
- if (autoCommit)
- {
- commit();
- }
+ autoCommit();
}
}
@@ -284,6 +270,14 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
}
}
+ protected void autoCommit()
+ {
+ if (autoCommit)
+ {
+ commit();
+ }
+ }
+
protected abstract Map<K, V> getMap();
/**

Back to the top