Class PgConnectionCleaningAction

java.lang.Object
org.postgresql.jdbc.PgConnectionCleaningAction
All Implemented Interfaces:
LazyCleaner.CleaningAction<IOException>

class PgConnectionCleaningAction extends Object implements LazyCleaner.CleaningAction<IOException>
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:

  • Print stacktrace when the connection has been created, so users can identify the leak
  • Release shared timer registration
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • lock

      private final ResourceLock lock
    • openStackTrace

      private Throwable openStackTrace
    • queryExecutorCloseAction

      private final Closeable queryExecutorCloseAction
    • cancelTimer

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

  • Method Details