Module org.jooq
Package org.jooq.impl

Class NoConnectionProvider

java.lang.Object
org.jooq.impl.NoConnectionProvider
All Implemented Interfaces:
ConnectionProvider

public class NoConnectionProvider extends Object implements ConnectionProvider
An "empty" implementation that is never connected.
Author:
Lukas Eder
  • Constructor Details

    • NoConnectionProvider

      public NoConnectionProvider()
  • Method Details

    • acquire

      @Nullable public final @Nullable Connection acquire()
      This method will always return null.
      Specified by:
      acquire in interface ConnectionProvider
      Returns:
      A connection for the current ExecuteContext. If null is returned (e.g. by NoConnectionProvider), then statements cannot be executed. Attempts to execute statements will result in a DetachedException.
    • release

      public final void release(Connection connection)
      This method has no effect.
      Specified by:
      release in interface ConnectionProvider
      Parameters:
      connection - A connection that was previously obtained from ConnectionProvider.acquire(). This is never null.