public final class PoemThread extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
threadsMax
The maximum number of Threads.
|
| Modifier and Type | Method and Description |
|---|---|
static AccessToken |
accessToken() |
static void |
assertHasCapability(Capability capability)
Check that we have the given
Capability, throw an
AccessPoemException if we don't. |
static void |
commit()
Commit to the underlying DBMS.
|
static Database |
database()
Retrieve the
Database associated with this thread. |
static boolean |
inSession()
Whether we are currently in a session.
|
static Vector<SessionToken> |
openSessions()
Retrieve the open sessions.
|
static void |
rollback()
Rollback the underlying DBMS.
|
static SessionToken |
sessionToken() |
static void |
setAccessToken(AccessToken token)
Change the access token under which your thread is operating.
|
static ToTidyList |
toTidy()
Retrieve the
ToTidyList for this session. |
static PoemTransaction |
transaction()
Retrieve the
PoemTransaction for this PoemThread. |
static void |
withAccessToken(AccessToken token,
PoemTask task)
Run a
PoemTask under a specified AccessToken, typically
Root. |
static void |
writeDown()
Write to the underlying DBMS.
|
public static final int threadsMax
public static Vector<SessionToken> openSessions()
SessionTokenspublic static SessionToken sessionToken() throws NotInSessionPoemException
NotInSessionPoemException - if there is no current SessionTokenpublic static ToTidyList toTidy() throws NotInSessionPoemException
ToTidyList for this session.ToTidyList for this PoemThread.NotInSessionPoemExceptionpublic static PoemTransaction transaction()
PoemTransaction for this PoemThread.PoemTransaction for this PoemThread.public static boolean inSession()
public static AccessToken accessToken() throws NotInSessionPoemException, NoAccessTokenPoemException
NotInSessionPoemException - if we are not in a sessionNoAccessTokenPoemException - if we do not have an AccessTokenpublic static void setAccessToken(AccessToken token) throws NonRootSetAccessTokenPoemException
NonRootSetAccessTokenPoemExceptionAccessToken.rootpublic static void withAccessToken(AccessToken token, PoemTask task)
PoemTask under a specified AccessToken, typically
Root.token - the token to run withtask - the task to runpublic static void assertHasCapability(Capability capability) throws NotInSessionPoemException, NoAccessTokenPoemException, AccessPoemException
Capability, throw an
AccessPoemException if we don't.capability - to checkNotInSessionPoemExceptionNoAccessTokenPoemExceptionAccessPoemExceptionpublic static Database database() throws NotInSessionPoemException
Database associated with this thread.Database associated with this thread.NotInSessionPoemExceptionpublic static void writeDown()
public static void commit()
public static void rollback()
Copyright © 2000–2021 PanEris. All rights reserved.