public final class StoreThreadLocal extends Object
store accessor
that is valid in the context of a
specific session
during read operations or a specific commit context
during
write operations.Modifier and Type | Class and Description |
---|---|
static class |
StoreThreadLocal.NoSessionRegisteredException
An
IllegalStateException that can be thrown from getSession() . |
Modifier and Type | Method and Description |
---|---|
static IStoreAccessor |
getAccessor() |
static IStoreAccessor.CommitContext |
getCommitContext() |
static InternalSession |
getSession()
Returns the session associated with the current thread.
|
static boolean |
hasSession() |
static void |
release() |
static void |
setAccessor(IStoreAccessor accessor) |
static void |
setCommitContext(IStoreAccessor.CommitContext commitContext) |
static void |
setSession(InternalSession session) |
public static void setSession(InternalSession session)
public static InternalSession getSession() throws StoreThreadLocal.NoSessionRegisteredException
null
.IllegalStateException
- if no session is associated with the current thread.StoreThreadLocal.NoSessionRegisteredException
public static boolean hasSession()
public static void setAccessor(IStoreAccessor accessor)
public static IStoreAccessor getAccessor() throws StoreThreadLocal.NoSessionRegisteredException
public static void setCommitContext(IStoreAccessor.CommitContext commitContext)
public static IStoreAccessor.CommitContext getCommitContext()
public static void release()
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.