public class StatementStreamingResultSetCloser extends AbstractStreamingResultSetCloser
ResultSet once it has been processedLOGGER| Constructor and Description |
|---|
StatementStreamingResultSetCloser() |
StatementStreamingResultSetCloser(boolean autoCloseConnection) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkValidConnectionLock(DbConnection connection,
Object connectionLock) |
void |
close(DbConnection connection,
ResultSet resultSet)
Closes the given
resultset. |
void |
closeResultSets(DbConnection connection)
Closes all tracked
ResultSets for the passed connection. |
protected Object |
getConnectionLock(DbConnection connection) |
protected Set<ResultSet> |
getConnectionResultSets(DbConnection connection,
ResultSet resultSet) |
protected int |
getLocksCount() |
protected Optional<Object> |
getTrackedConnectionLock(DbConnection connection) |
protected void |
releaseResources(DbConnection connection) |
void |
trackResultSet(DbConnection connection,
ResultSet resultSet)
Adds a resultSet for tracking in order to be able to close it later
|
public StatementStreamingResultSetCloser()
public StatementStreamingResultSetCloser(boolean autoCloseConnection)
public void closeResultSets(DbConnection connection)
ResultSets for the passed connection.connection - public void close(DbConnection connection, ResultSet resultSet)
StreamingResultSetCloserresultset. It also must invoke DbConnection.endStreaming() and
DbConnection.release() even if the operation failsclose in interface StreamingResultSetCloserclose in class AbstractStreamingResultSetCloserconnection - the connection to the DBresultSet - the ResultSetpublic void trackResultSet(DbConnection connection, ResultSet resultSet)
connection - connection that holds the resultSetresultSet - resultSet to trackprotected Optional<Object> getTrackedConnectionLock(DbConnection connection)
protected void releaseResources(DbConnection connection)
protected Set<ResultSet> getConnectionResultSets(DbConnection connection, ResultSet resultSet)
protected void checkValidConnectionLock(DbConnection connection, Object connectionLock)
protected Object getConnectionLock(DbConnection connection)
protected int getLocksCount()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.