|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.services.context.ContextManager
The ContextManager collects contexts as they are created. It maintains stacks of contexts by named ids, so that the top context of a given type can be returned. It also maintains a global stack so that contexts can be traversed in the order they were created.
The first implementation of the context manager assumes there is only one thread to worry about and that the user(s) of the class only create one instance of ContextManager.
Field Summary | |
(package private) int |
activeCount
|
(package private) java.lang.Thread |
activeThread
|
(package private) java.util.Stack |
cmStack
|
private java.util.Hashtable |
ctxTable
|
private HeaderPrintWriter |
errorStream
|
private ErrorStringBuilder |
errorStringBuilder
|
private LocaleFinder |
finder
|
private java.util.Stack |
holder
|
private int |
logSeverityLevel
|
private java.util.Locale |
messageLocale
|
(package private) ContextService |
owningCsf
|
private boolean |
shutdown
|
Constructor Summary | |
(package private) |
ContextManager(ContextService csf,
HeaderPrintWriter stream)
constructor specifying the hash table size and load factor for the hashed-by-id context stacks. |
Method Summary | |
private void |
checkInterrupt()
Check to see if we have been interrupted. |
boolean |
cleanupOnError(java.lang.Throwable error)
|
private void |
flushErrorString()
Flush the built up error string to whereever it is supposed to go, and reset the error string |
Context |
getContext(java.lang.String contextId)
|
java.util.Locale |
getMessageLocale()
|
void |
popContext()
|
(package private) void |
popContext(Context theContext)
|
void |
pushContext(Context newContext)
|
private boolean |
reportError(java.lang.Throwable t)
|
(package private) boolean |
setInterrupted(Context c)
|
void |
setLocaleFinder(LocaleFinder finder)
Set the locale for this context. |
void |
setMessageLocale(java.lang.String localeID)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.util.Stack holder
private java.util.Locale messageLocale
private final java.util.Hashtable ctxTable
final ContextService owningCsf
private int logSeverityLevel
private HeaderPrintWriter errorStream
private ErrorStringBuilder errorStringBuilder
private boolean shutdown
private LocaleFinder finder
final java.util.Stack cmStack
java.lang.Thread activeThread
int activeCount
Constructor Detail |
ContextManager(ContextService csf, HeaderPrintWriter stream)
Method Detail |
public void pushContext(Context newContext)
public Context getContext(java.lang.String contextId)
getContext(java.lang.String)
public void popContext()
popContext()
void popContext(Context theContext)
public boolean cleanupOnError(java.lang.Throwable error)
boolean setInterrupted(Context c)
private void checkInterrupt()
public void setLocaleFinder(LocaleFinder finder)
public void setMessageLocale(java.lang.String localeID) throws StandardException
StandardException
public java.util.Locale getMessageLocale()
private void flushErrorString()
private boolean reportError(java.lang.Throwable t)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |