use of org.firebirdsql.gds.ng.wire.Response in project jaybird by FirebirdSQL.
the class V11Statement method free.
@Override
protected void free(final int option) throws SQLException {
synchronized (getSynchronizationObject()) {
try {
doFreePacket(option);
/*
Don't flush close of cursor, only flush drop or unprepare of statement.
This balances network efficiencies with preventing statements
retaining locks on metadata objects too long
*/
if (option != ISCConstants.DSQL_close) {
getXdrOut().flush();
}
// process response later
getDatabase().enqueueDeferredAction(new DeferredAction() {
@Override
public void processResponse(Response response) {
processFreeResponse(response);
}
@Override
public WarningMessageCallback getWarningMessageCallback() {
return getStatementWarningCallback();
}
});
} catch (IOException ex) {
switchState(StatementState.ERROR);
throw new FbExceptionBuilder().exception(ISCConstants.isc_net_write_err).cause(ex).toSQLException();
}
}
}
Aggregations