Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.embedded/src/org/eclipse/emf/cdo/server/internal/embedded/ServerSession.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.embedded/src/org/eclipse/emf/cdo/server/internal/embedded/ServerSession.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.embedded/src/org/eclipse/emf/cdo/server/internal/embedded/ServerSession.java b/plugins/org.eclipse.emf.cdo.server.embedded/src/org/eclipse/emf/cdo/server/internal/embedded/ServerSession.java
new file mode 100644
index 0000000000..d1ad10838b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.embedded/src/org/eclipse/emf/cdo/server/internal/embedded/ServerSession.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2016 Eike Stepper (Berlin, Germany) and others.
+ * 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.emf.cdo.server.internal.embedded;
+
+import org.eclipse.emf.cdo.spi.server.InternalSession;
+
+/**
+ * @author Eike Stepper
+ */
+public final class ServerSession
+{
+ private static final ThreadLocal<InternalSession> THREAD_LOCAL = new ThreadLocal<InternalSession>();
+
+ private ServerSession()
+ {
+ }
+
+ public static InternalSession get()
+ {
+ return THREAD_LOCAL.get();
+ }
+
+ static void set(InternalSession serverSession)
+ {
+ THREAD_LOCAL.set(serverSession);
+ }
+
+ static void unset()
+ {
+ THREAD_LOCAL.remove();
+ }
+}

Back to the top