Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
RemoteDbSessionCleanupThread(long checkInterval,
Set<WeakReference<RemoteDbSessionImpl>> sessions,
int cleanupRetryMax)
Creates the cleanup thread.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupSession(RemoteDbSessionImpl session)
Cleans up a session.
|
protected boolean |
cleanupZombieSession(RemoteDbSessionImpl session)
Cleans up a zombie session.
|
protected void |
cleanupZombieSessions()
Cleans up all zombie sessions.
|
boolean |
isScavenging() |
void |
requestTermination()
Requests thread termination.
|
void |
run() |
protected void |
verifySessions()
Verifies and cleans up the sessions.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisScavengerpublic RemoteDbSessionCleanupThread(long checkInterval,
Set<WeakReference<RemoteDbSessionImpl>> sessions,
int cleanupRetryMax)
checkInterval - milliseconds to sleep between runssessions - the sessionscleanupRetryMax - maximum number of retries to clean up a sessionpublic void requestTermination()
public boolean isScavenging()
isScavenging in interface Scavengerprotected void verifySessions()
Finds all db-groups or non-grouped db that are not alive anymore and closes their sessions. If _all_ dbs of a group have timed out, the whole group is closed. Usually the ModificationThread of a client connection will keep up a db-group alive. If the application uses only a single db-session, it must set the db-alive manually.
protected void cleanupSession(RemoteDbSessionImpl session)
session - the sessionprotected void cleanupZombieSessions()
protected boolean cleanupZombieSession(RemoteDbSessionImpl session)
session - the sessionCopyright © 2016 Krake Softwaretechnik. All rights reserved.