public interface JdbcResourceRegistry extends Serializable
register(java.sql.Statement)
and register(java.sql.ResultSet)
methods. When done with these resources, they should be released by the corollary
release(java.sql.Statement)
and release(java.sql.ResultSet)
methods. Any un-released resources
will be released automatically when this registry is closed via close()
. Additionally,
all registered resources can be released at any time using releaseResources()
.
Additionally, a query can be registered as being able to be cancelled via the registerLastQuery(java.sql.Statement)
method. Such statements can then be cancelled by calling cancelLastQuery()
Modifier and Type | Method and Description |
---|---|
void |
cancelLastQuery()
Cancel the last query registered via
registerLastQuery(java.sql.Statement) |
void |
close()
Close this registry.
|
boolean |
hasRegisteredResources()
Does this registry currently have any registered resources?
|
void |
register(ResultSet resultSet)
Register a JDBC result set.
|
void |
register(Statement statement)
Register a JDBC statement.
|
void |
registerLastQuery(Statement statement)
Register a query statement as being able to be cancelled.
|
void |
release(ResultSet resultSet)
Release a previously registered result set.
|
void |
release(Statement statement)
Release a previously registered statement.
|
void |
releaseResources()
Release all registered resources.
|
void register(Statement statement)
statement
- The statement to register.void release(Statement statement)
statement
- The statement to release.void register(ResultSet resultSet)
resultSet
- The result set to register.void release(ResultSet resultSet)
resultSet
- The result set to release.boolean hasRegisteredResources()
void releaseResources()
void close()
releases
any registered resources.
After execution, the registry is considered unusable.void registerLastQuery(Statement statement)
statement
- The cancel-able query statement.void cancelLastQuery()
registerLastQuery(java.sql.Statement)
Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.