private static class TempTableConnectionProvider.Context
extends java.lang.Object
TemporaryBuffer
class.Modifier and Type | Field and Description |
---|---|
private java.sql.Connection |
connection
Active JDBC connection for temp tables in this client context
|
Modifier | Constructor and Description |
---|---|
private |
Context() |
Modifier and Type | Method and Description |
---|---|
private void |
closeConnection(java.sql.Connection conn)
Optionally release a JDBC connection to the delegate connection
provider.
|
private void |
contextCleanup()
Perform clean up when the current client context is being closed.
|
private java.sql.Connection |
getConnection()
Fetch a JDBC connection, which will be either the cached connection
(if previously opened and not subsequently closed), or which will be
newly obtained from the delegate connection provider (if it is not
currently cached).
|
private java.lang.String |
status(java.lang.String message)
Generate a debug string which reports the current status of this
object along with a custom message.
|
private java.sql.Connection connection
private java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs obtaining the connection from the
backing datastore.private void closeConnection(java.sql.Connection conn) throws java.sql.SQLException
conn
- JDBC connection to be returned to the provider.java.lang.IllegalStateException
- if the connection returned (conn
) is not the
same connection currently cached by this object.java.sql.SQLException
- if an error occurs closing the connection.private void contextCleanup()
private java.lang.String status(java.lang.String message)
message
- Message to be prepended to the status string.