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
Nested ClassesModifier and TypeClassDescriptionstatic final classAnIllegalStateExceptionthat can be thrown fromgetSession(). -
Method Summary
Modifier and TypeMethodDescriptionstatic IStoreAccessorstatic IStoreAccessor.CommitContextstatic InternalSessionReturns the session associated with the current thread.static InternalSessionReturns the session associated with the current thread, ornullif no session is registered.static booleanstatic booleanstatic booleanstatic voidrelease()static voidremove()static voidsetAccessor(IStoreAccessor accessor) static voidsetCommitContext(IStoreAccessor.CommitContext commitContext) static voidsetSession(InternalSession session) static Runnablestatic <T> Callable<T>
-
Method Details
-
wrap
-
wrap
-
setSession
- Since:
- 3.0
-
getSession
Returns the session associated with the current thread.- Returns:
- Never
null. - Throws:
StoreThreadLocal.NoSessionRegisteredException- if no session is associated with the current thread.- Since:
- 3.0
-
getSessionOrNull
Returns the session associated with the current thread, ornullif no session is registered.- Since:
- 4.27
-
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
-