public class StandardClient extends Object implements com.singlestore.jdbc.client.Client, AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected com.singlestore.jdbc.client.Context |
context |
protected ExceptionFactory |
exceptionFactory |
protected boolean |
timeOut |
protected Writer |
writer |
| Constructor and Description |
|---|
StandardClient(Configuration conf,
HostAddress hostAddress,
ReentrantLock lock,
boolean skipPostCommands) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Executor executor) |
protected void |
checkNotClosed() |
void |
close() |
void |
closePrepare(Prepare prepare) |
protected void |
destroySocket()
Closing socket in case of Connection error after socket creation.
|
List<com.singlestore.jdbc.client.Completion> |
execute(com.singlestore.jdbc.message.ClientMessage message) |
List<com.singlestore.jdbc.client.Completion> |
execute(com.singlestore.jdbc.message.ClientMessage message,
Statement stmt) |
List<com.singlestore.jdbc.client.Completion> |
execute(com.singlestore.jdbc.message.ClientMessage message,
Statement stmt,
int fetchSize,
long maxRows,
int resultSetConcurrency,
int resultSetType,
boolean closeOnCompletion) |
List<com.singlestore.jdbc.client.Completion> |
executePipeline(com.singlestore.jdbc.message.ClientMessage[] messages,
Statement stmt,
int fetchSize,
long maxRows,
int resultSetConcurrency,
int resultSetType,
boolean closeOnCompletion) |
com.singlestore.jdbc.client.Context |
getContext() |
ExceptionFactory |
getExceptionFactory() |
HostAddress |
getHostAddress() |
int |
getSocketTimeout() |
int |
getWaitTimeout() |
boolean |
isClosed() |
boolean |
isPrimary() |
com.singlestore.jdbc.client.Completion |
readPacket(com.singlestore.jdbc.message.ClientMessage message) |
com.singlestore.jdbc.client.Completion |
readPacket(Statement stmt,
com.singlestore.jdbc.message.ClientMessage message,
int fetchSize,
long maxRows,
int resultSetConcurrency,
int resultSetType,
boolean closeOnCompletion)
Read server response packet.
|
void |
readResponse(com.singlestore.jdbc.message.ClientMessage message) |
List<com.singlestore.jdbc.client.Completion> |
readResponse(Statement stmt,
com.singlestore.jdbc.message.ClientMessage message,
int fetchSize,
long maxRows,
int resultSetConcurrency,
int resultSetType,
boolean closeOnCompletion) |
void |
readStreamingResults(List<com.singlestore.jdbc.client.Completion> completions,
int fetchSize,
long maxRows,
int resultSetConcurrency,
int resultSetType,
boolean closeOnCompletion) |
void |
reset() |
int |
sendQuery(com.singlestore.jdbc.message.ClientMessage message) |
void |
setReadOnly(boolean readOnly) |
void |
setSocketTimeout(int milliseconds) |
protected final ExceptionFactory exceptionFactory
protected Writer writer
protected com.singlestore.jdbc.client.Context context
protected boolean timeOut
public StandardClient(Configuration conf, HostAddress hostAddress, ReentrantLock lock, boolean skipPostCommands) throws SQLException
SQLExceptionprotected void destroySocket()
public void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic int sendQuery(com.singlestore.jdbc.message.ClientMessage message)
throws SQLException
SQLExceptionpublic List<com.singlestore.jdbc.client.Completion> execute(com.singlestore.jdbc.message.ClientMessage message) throws SQLException
execute in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic List<com.singlestore.jdbc.client.Completion> execute(com.singlestore.jdbc.message.ClientMessage message, Statement stmt) throws SQLException
execute in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic List<com.singlestore.jdbc.client.Completion> executePipeline(com.singlestore.jdbc.message.ClientMessage[] messages, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion) throws SQLException
executePipeline in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic List<com.singlestore.jdbc.client.Completion> execute(com.singlestore.jdbc.message.ClientMessage message, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion) throws SQLException
execute in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic List<com.singlestore.jdbc.client.Completion> readResponse(Statement stmt, com.singlestore.jdbc.message.ClientMessage message, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion) throws SQLException
SQLExceptionpublic void readResponse(com.singlestore.jdbc.message.ClientMessage message)
throws SQLException
SQLExceptionpublic void closePrepare(Prepare prepare) throws SQLException
closePrepare in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic void readStreamingResults(List<com.singlestore.jdbc.client.Completion> completions, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion) throws SQLException
readStreamingResults in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic com.singlestore.jdbc.client.Completion readPacket(com.singlestore.jdbc.message.ClientMessage message)
throws SQLException
SQLExceptionpublic com.singlestore.jdbc.client.Completion readPacket(Statement stmt, com.singlestore.jdbc.message.ClientMessage message, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion) throws SQLException
stmt - current statement (null if internal)message - current messagefetchSize - default fetch sizeresultSetConcurrency - concurrencyresultSetType - typecloseOnCompletion - must resultset close statement on completionSQLException - if any exceptionprotected void checkNotClosed()
throws SQLException
SQLExceptionpublic int getWaitTimeout()
getWaitTimeout in interface com.singlestore.jdbc.client.Clientpublic boolean isClosed()
isClosed in interface com.singlestore.jdbc.client.Clientpublic com.singlestore.jdbc.client.Context getContext()
getContext in interface com.singlestore.jdbc.client.Clientpublic void abort(Executor executor) throws SQLException
abort in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic int getSocketTimeout()
getSocketTimeout in interface com.singlestore.jdbc.client.Clientpublic void setSocketTimeout(int milliseconds)
throws SQLException
setSocketTimeout in interface com.singlestore.jdbc.client.ClientSQLExceptionpublic void close()
throws SQLException
close in interface com.singlestore.jdbc.client.Clientclose in interface AutoCloseableSQLExceptionpublic boolean isPrimary()
isPrimary in interface com.singlestore.jdbc.client.Clientpublic ExceptionFactory getExceptionFactory()
getExceptionFactory in interface com.singlestore.jdbc.client.Clientpublic HostAddress getHostAddress()
getHostAddress in interface com.singlestore.jdbc.client.Clientpublic void reset()
reset in interface com.singlestore.jdbc.client.ClientCopyright © 2023 SingleStore. All rights reserved.