Package org.h2.engine
Class DelayedDatabaseCloser
- java.lang.Object
-
- java.lang.Thread
-
- org.h2.engine.DelayedDatabaseCloser
-
- All Implemented Interfaces:
java.lang.Runnable
class DelayedDatabaseCloser extends java.lang.Thread
This class is responsible to close a database after the specified delay. A database closer object only exists if there is no user connected to the database.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ref.WeakReference<Database>
databaseRef
private int
delayInMillis
private Trace
trace
-
Constructor Summary
Constructors Constructor Description DelayedDatabaseCloser(Database db, int delayInMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
reset()
Stop and disable the database closer.void
run()
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
DelayedDatabaseCloser
DelayedDatabaseCloser(Database db, int delayInMillis)
-
-