summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-11-13 05:18:59 (EST)
committerEike Stepper2006-11-13 05:18:59 (EST)
commitd8da00be865b74905725fd8c95b50edca443c874 (patch)
tree5a4f53ddc4de476e8b42e64deb5fcaf2c18984cf
parentc1aeefd10a5eaf5e714952d9eb98b8215e87ee1d (diff)
downloadcdo-d8da00be865b74905725fd8c95b50edca443c874.zip
cdo-d8da00be865b74905725fd8c95b50edca443c874.tar.gz
cdo-d8da00be865b74905725fd8c95b50edca443c874.tar.bz2
Made IRegistry transactional
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java7
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/AbstractCachingRegistry.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/AbstractCachingRegistry.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/DelegatingRegistry.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/DelegatingRegistry.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/HashCacheRegistry.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/HashCacheRegistry.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/resolver/IResolveable.java21
5 files changed, 30 insertions, 4 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 a5c5170..f9f6711 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
@@ -143,8 +143,13 @@ public abstract class AbstractRegistry<K, V> implements IRegistry<K, V>
public synchronized void commit()
{
- if (transaction != null && transaction.isOwned())
+ if (transaction != null)
{
+ if (!transaction.isOwned())
+ {
+ Net4j.LOG.warn("Committing thread is not owner of transaction: " + Thread.currentThread());
+ }
+
transaction.commit();
transaction = null;
notifyAll();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/AbstractCachingRegistry.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/AbstractCachingRegistry.java
index 7ea2c84..b364fc9 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/AbstractCachingRegistry.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/AbstractCachingRegistry.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.registry.delegating;
+package org.eclipse.net4j.util.registry.delegator;
import org.eclipse.net4j.util.registry.IRegistry;
import org.eclipse.net4j.util.registry.IRegistryElement.Descriptor;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/DelegatingRegistry.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/DelegatingRegistry.java
index 4ef308a..a6ff49d 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/DelegatingRegistry.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/DelegatingRegistry.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.registry.delegating;
+package org.eclipse.net4j.util.registry.delegator;
import org.eclipse.net4j.util.registry.AbstractRegistry;
import org.eclipse.net4j.util.registry.IRegistry;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/HashCacheRegistry.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/HashCacheRegistry.java
index 88ec562..96b3b11 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegating/HashCacheRegistry.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/delegator/HashCacheRegistry.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.registry.delegating;
+package org.eclipse.net4j.util.registry.delegator;
import org.eclipse.net4j.util.registry.IRegistry;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/resolver/IResolveable.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/resolver/IResolveable.java
new file mode 100644
index 0000000..a138adc
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/resolver/IResolveable.java
@@ -0,0 +1,21 @@
+/***************************************************************************
+ * Copyright (c) 2004, 2005, 2006 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.util.registry.resolver;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IResolveable<V>
+{
+ public V resolve();
+
+ public boolean deresolve();
+}