Package org.mariadb.jdbc.client.util
Class SchedulerProvider
- java.lang.Object
-
- org.mariadb.jdbc.client.util.SchedulerProvider
-
public final class SchedulerProvider extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static longIDLE_THREAD_TIMEOUT_SECONDSprivate static java.lang.ObjectLOCKprivate static java.util.concurrent.ScheduledThreadPoolExecutortimeoutScheduler
-
Constructor Summary
Constructors Modifier Constructor Description privateSchedulerProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidclose()Shut down the shared timeout scheduler, if any, cancelling pending timeout tasks.static java.util.concurrent.ScheduledThreadPoolExecutorgetTimeoutScheduler()static java.util.concurrent.ScheduledThreadPoolExecutorgetTimeoutScheduler(ClosableLock lock)Deprecated.usegetTimeoutScheduler(); the scheduler is guarded by its own lock
-
-
-
Field Detail
-
IDLE_THREAD_TIMEOUT_SECONDS
static final long IDLE_THREAD_TIMEOUT_SECONDS
- See Also:
- Constant Field Values
-
LOCK
private static final java.lang.Object LOCK
-
timeoutScheduler
private static volatile java.util.concurrent.ScheduledThreadPoolExecutor timeoutScheduler
-
-
Method Detail
-
getTimeoutScheduler
public static java.util.concurrent.ScheduledThreadPoolExecutor getTimeoutScheduler()
-
getTimeoutScheduler
@Deprecated public static java.util.concurrent.ScheduledThreadPoolExecutor getTimeoutScheduler(ClosableLock lock)
Deprecated.usegetTimeoutScheduler(); the scheduler is guarded by its own lockGet the shared timeout scheduler.- Parameters:
lock- ignored, kept for source compatibility- Returns:
- the shared timeout scheduler
-
close
public static void close()
Shut down the shared timeout scheduler, if any, cancelling pending timeout tasks. Intended for application shutdown or undeploy, after connections are closed. Safe to call several times; a later use of the driver recreates the scheduler.
-
-