Class H2PooledConnection
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.h2.H2PooledConnection
-
- All Implemented Interfaces:
AutoCloseable
public class H2PooledConnection extends Object implements AutoCloseable
Pooled connection wrapper to use close semantic to recycle connection (return to the pool).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes wrapped connection (return to pool or close).Connectionconnection()PreparedStatementprepareStatement(String sql, byte qryFlags)Prepare statement caching it if needed.PreparedStatementprepareStatementNoCache(String sql)Get prepared statement without caching.Stringschema()voidschema(@Nullable String schema)intstatementCacheSize()StringtoString()
-
-
-
Method Detail
-
schema
public String schema()
- Returns:
- Schema name if schema is set, null otherwise.
-
schema
public void schema(@Nullable @Nullable String schema)- Parameters:
schema- Schema name set on this connection.
-
connection
public Connection connection()
- Returns:
- Connection.
-
statementCacheSize
public int statementCacheSize()
- Returns:
- Statement cache size.
-
prepareStatement
public PreparedStatement prepareStatement(String sql, byte qryFlags) throws IgniteCheckedException
Prepare statement caching it if needed.- Parameters:
sql- SQL.- Returns:
- Prepared statement.
- Throws:
IgniteCheckedException
-
prepareStatementNoCache
public PreparedStatement prepareStatementNoCache(String sql) throws IgniteCheckedException
Get prepared statement without caching.- Parameters:
sql- SQL.- Returns:
- Prepared statement.
- Throws:
IgniteCheckedException
-
close
public void close()
Closes wrapped connection (return to pool or close).- Specified by:
closein interfaceAutoCloseable
-
-