summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-11-14 01:01:45 (EST)
committerEike Stepper2006-11-14 01:01:45 (EST)
commit33383841ebccdde77944cf9f89997acd7156006f (patch)
tree7a66f5b2382c3142018136011203d92a6ca25b73
parent2964c077221f87b95cc1586865cee95498d8fe19 (diff)
downloadcdo-33383841ebccdde77944cf9f89997acd7156006f.zip
cdo-33383841ebccdde77944cf9f89997acd7156006f.tar.gz
cdo-33383841ebccdde77944cf9f89997acd7156006f.tar.bz2
Made IRegistry transactional
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java13
1 files changed, 12 insertions, 1 deletions
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 bf91e17..93b8691 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
@@ -16,6 +16,7 @@ import org.eclipse.internal.net4j.bundle.Net4j;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -247,6 +248,16 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
}
}
+ protected void fireRegistryEvent(IRegistryDelta<K, V> delta)
+ {
+ fireRegistryEvent(Collections.singletonList(delta));
+ }
+
+ protected void fireRegistryEvent(List<IRegistryDelta<K, V>> deltas)
+ {
+ fireRegistryEvent(new RegistryEvent<K, V>(AbstractRegistry.this, deltas));
+ }
+
protected void fireRegistryEvent(IRegistryEvent<K, V> event)
{
if (TRACER.isEnabled())
@@ -330,7 +341,7 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
{
if (notifications && !deltas.isEmpty())
{
- fireRegistryEvent(new RegistryEvent<K, V>(AbstractRegistry.this, deltas));
+ fireRegistryEvent(deltas);
}
deltas = null;