summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-02-05 03:00:24 (EST)
committerEike Stepper2007-02-05 03:00:24 (EST)
commit898f95101a8c80b562ef9f2ba8b02bf0fb2b5f1a (patch)
tree41262e8df8c413ef73b64b6e19bbf83bce1c5438
parentd5e0069d9600520bc819e8140d26581f38cbbbea (diff)
downloadcdo-898f95101a8c80b562ef9f2ba8b02bf0fb2b5f1a.zip
cdo-898f95101a8c80b562ef9f2ba8b02bf0fb2b5f1a.tar.gz
cdo-898f95101a8c80b562ef9f2ba8b02bf0fb2b5f1a.tar.bz2
Develop CDO2 - http://www.eclipse.org/emft/projects/cdo/#cdo
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Channel.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Connector.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/ProtocolFactory.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Singleton.java1
4 files changed, 5 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Channel.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Channel.java
index bd8f20c..2cf2f8d 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Channel.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Channel.java
@@ -28,7 +28,7 @@ import org.eclipse.net4j.util.registry.IRegistry;
*/
public interface Channel extends BufferHandler
{
- @Singleton
+ @Singleton(stateful = true)
public static final IRegistry<ChannelID, Channel> REGISTRY = new HashMapRegistry();
public short getChannelIndex();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Connector.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Connector.java
index 282fb51..8ab36b3 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Connector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Connector.java
@@ -37,7 +37,7 @@ import java.util.concurrent.ExecutorService;
*/
public interface Connector
{
- @Singleton
+ @Singleton(stateful = true)
public static final IRegistry<Integer, Connector> REGISTRY = new HashMapRegistry();
public Integer getID();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/ProtocolFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/ProtocolFactory.java
index 891312f..e425039 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/ProtocolFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/ProtocolFactory.java
@@ -26,10 +26,10 @@ import java.util.Set;
*/
public interface ProtocolFactory
{
- @Singleton
+ @Singleton(stateful = true)
public static final ClientProtocolFactoryRegistry CLIENT_REGISTRY = new ClientProtocolFactoryRegistry();
- @Singleton
+ @Singleton(stateful = true)
public static final ServerProtocolFactoryRegistry SERVER_REGISTRY = new ServerProtocolFactoryRegistry();
public static final Set<Type> FOR_CLIENTS = Collections.singleton(Type.CLIENT);
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Singleton.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Singleton.java
index 23c8989..60b058d 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Singleton.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Singleton.java
@@ -22,4 +22,5 @@ import java.lang.annotation.Target;
@Target(ElementType.FIELD)
public @interface Singleton
{
+ boolean stateful() default false;
}