Top Description Fields Constructors Methods
org.postgresql.jdbc

pack-priv Class PgConnectionCleaningAction

extends Object
implements LazyCleaner.CleaningAction<IOException>
Class Inheritance
All Implemented Interfaces
org.postgresql.util.LazyCleaner.CleaningAction
Imports
org.postgresql.Driver, org.postgresql.util.GT, .LazyCleaner, org.checkerframework.checker.nullness.qual.Nullable, java.io.Closeable, .IOException, java.util.Timer, java.util.logging.Level, .Logger

This class segregates the minimal resources required for proper cleanup in case the connection has not been closed by the user code.

For now, it has two actions:

Field Summary

Modifier and TypeField and Description
private @Nullable Timer
cancelTimer

Timer for scheduling TimerTasks for the connection.

private final ResourceLock
private static final Logger
private @Nullable Throwable
private final Closeable

Constructor Summary

AccessConstructor and Description
pack-priv
PgConnectionCleaningAction(ResourceLock lock, @Nullable Throwable openStackTrace, Closeable queryExecutorCloseAction)

Method Summary

Modifier and TypeMethod and Description
public Timer
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cancelTimerback to summary
private @Nullable Timer cancelTimer

Timer for scheduling TimerTasks for the connection. Only instantiated if a task is actually scheduled. Access should be guarded with lock

lockback to summary
private final ResourceLock lock
LOGGERback to summary
private static final Logger LOGGER
openStackTraceback to summary
private @Nullable Throwable openStackTrace
queryExecutorCloseActionback to summary
private final Closeable queryExecutorCloseAction

Constructor Detail

PgConnectionCleaningActionback to summary
pack-priv PgConnectionCleaningAction(ResourceLock lock, @Nullable Throwable openStackTrace, Closeable queryExecutorCloseAction)

Method Detail

getTimerback to summary
public Timer getTimer()
onCleanback to summary
public void onClean(boolean leak) throws IOException

Implements org.postgresql.util.LazyCleaner.CleaningAction.onClean.

Annotations
@Override
purgeTimerTasksback to summary
public void purgeTimerTasks()
releaseTimerback to summary
public void releaseTimer()