Package org.eclipse.emf.cdo.server
Class StoreThreadLocal
java.lang.Object
org.eclipse.emf.cdo.server.StoreThreadLocal
Provides server-side consumers with the
store accessor
that is valid in the context of a
specific session
during read operations or a specific commit context
during
write operations.- Since:
- 2.0
- Author:
- Eike Stepper
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
AnIllegalStateException
that can be thrown fromgetSession()
. -
Method Summary
Modifier and TypeMethodDescriptionstatic IStoreAccessor
static IStoreAccessor.CommitContext
static InternalSession
Returns the session associated with the current thread.static boolean
static boolean
static boolean
static void
release()
static void
remove()
static void
setAccessor
(IStoreAccessor accessor) static void
setCommitContext
(IStoreAccessor.CommitContext commitContext) static void
setSession
(InternalSession session) static Runnable
static <T> Callable<T>
-
Method Details
-
wrap
- Since:
- 4.11
-
wrap
- Since:
- 4.11
-
setSession
- Since:
- 3.0
-
getSession
Returns the session associated with the current thread.- Returns:
- Never
null
. - Throws:
IllegalStateException
- if no session is associated with the current thread.StoreThreadLocal.NoSessionRegisteredException
- Since:
- 3.0
-
hasSession
public static boolean hasSession()- Since:
- 4.2
-
setAccessor
-
getAccessor
-
hasAccessor
public static boolean hasAccessor()- Since:
- 4.7
-
setCommitContext
-
getCommitContext
-
hasCommitContext
public static boolean hasCommitContext()- Since:
- 4.7
-
release
public static void release()- Since:
- 4.2
-
remove
public static void remove()- Since:
- 4.5
-