- 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 Summary
Constructors Constructor Description NoConnectionProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable Connection
acquire()
This method will always returnnull
.void
release(Connection connection)
This method has no effect.
-
-
-
Method Detail
-
acquire
@Nullable public final @Nullable Connection acquire()
This method will always returnnull
.- Specified by:
acquire
in interfaceConnectionProvider
- Returns:
- A connection for the current
ExecuteContext
. Ifnull
is returned (e.g. by NoConnectionProvider), then statements cannot be executed. Attempts to execute statements will result in aDetachedException
.
-
release
public final void release(Connection connection)
This method has no effect.- Specified by:
release
in interfaceConnectionProvider
- Parameters:
connection
- A connection that was previously obtained fromConnectionProvider.acquire()
. This is nevernull
.
-
-