private int getTimeout() throws SQLException { // input and output protocol are identical in our usage TTransport socket = this.clientService.getInputProtocol().getTransport(); if (socket instanceof SocketTimeout) { try { return ((SocketTimeout)socket).getSoTimeout(); } catch (SocketException se) { throw informListeners(ThriftExceptionUtil.newSQLException( SQLState.SOCKET_EXCEPTION, se, se.getMessage())); } } else { return 0; } } }
private void setTimeout(int milliseconds) throws SQLException { // input and output protocol are identical in our usage TTransport socket = this.clientService.getInputProtocol().getTransport(); if (socket instanceof SocketTimeout) { try { ((SocketTimeout)socket).setSoTimeout(milliseconds); } catch (SocketException se) { throw informListeners(ThriftExceptionUtil.newSQLException( SQLState.SOCKET_EXCEPTION, se, se.getMessage())); } } }
if (((SocketTimeout)transport).isSocketToSameHost()) {
.getOutputProtocol().getTransport(); if (currentTransport instanceof SocketTimeout) { readTimeout = ((SocketTimeout)currentTransport).getRawTimeout(); if (readTimeout == 0) { // not set readTimeout = socketParams.getReadTimeout();