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
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 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
- 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
-