public class MultiPrimaryReplicaClient extends MultiPrimaryClient
remark: would have been better using proxy, but for AOT compilation, avoiding to using not supported proxy class.
| Modifier and Type | Field and Description |
|---|---|
protected long |
waitTimeout |
closed, conf, currentClient, deniedListTimeout, denyList, lock| Constructor and Description |
|---|
MultiPrimaryReplicaClient(Configuration conf,
ReentrantLock lock) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Executor executor) |
void |
close() |
void |
closePrepare(Prepare prepare) |
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() |
boolean |
isPrimary() |
void |
readStreamingResults(List<com.singlestore.jdbc.client.Completion> completions,
int fetchSize,
long maxRows,
int resultSetConcurrency,
int resultSetType,
boolean closeOnCompletion) |
protected void |
reConnect()
Reconnect connection, trying to continue transparently if possible.
|
void |
reset() |
void |
setReadOnly(boolean readOnly) |
void |
setSocketTimeout(int milliseconds) |
connectHost, execute, execute, executeTransactionReplay, getWaitTimeout, isClosed, syncNewStatepublic MultiPrimaryReplicaClient(Configuration conf, ReentrantLock lock) throws SQLException
SQLExceptionprotected void reConnect()
throws SQLException
if reconnect succeed on replica / use master, no problem, continuing without interruption // if reconnect primary, then replay transaction / throw exception if was in transaction.
reConnect in class MultiPrimaryClientSQLException - if exceptionpublic 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.Clientexecute in class MultiPrimaryClientSQLExceptionpublic 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.ClientexecutePipeline in class MultiPrimaryClientSQLExceptionpublic 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.ClientreadStreamingResults in class MultiPrimaryClientSQLExceptionpublic void closePrepare(Prepare prepare) throws SQLException
closePrepare in interface com.singlestore.jdbc.client.ClientclosePrepare in class MultiPrimaryClientSQLExceptionpublic void abort(Executor executor) throws SQLException
abort in interface com.singlestore.jdbc.client.Clientabort in class MultiPrimaryClientSQLExceptionpublic void close()
close in interface com.singlestore.jdbc.client.Clientclose in interface AutoCloseableclose in class MultiPrimaryClientpublic void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface com.singlestore.jdbc.client.ClientsetReadOnly in class MultiPrimaryClientSQLExceptionpublic int getSocketTimeout()
getSocketTimeout in interface com.singlestore.jdbc.client.ClientgetSocketTimeout in class MultiPrimaryClientpublic void setSocketTimeout(int milliseconds)
throws SQLException
setSocketTimeout in interface com.singlestore.jdbc.client.ClientsetSocketTimeout in class MultiPrimaryClientSQLExceptionpublic com.singlestore.jdbc.client.Context getContext()
getContext in interface com.singlestore.jdbc.client.ClientgetContext in class MultiPrimaryClientpublic ExceptionFactory getExceptionFactory()
getExceptionFactory in interface com.singlestore.jdbc.client.ClientgetExceptionFactory in class MultiPrimaryClientpublic HostAddress getHostAddress()
getHostAddress in interface com.singlestore.jdbc.client.ClientgetHostAddress in class MultiPrimaryClientpublic boolean isPrimary()
isPrimary in interface com.singlestore.jdbc.client.ClientisPrimary in class MultiPrimaryClientpublic void reset()
reset in interface com.singlestore.jdbc.client.Clientreset in class MultiPrimaryClientCopyright © 2023 SingleStore. All rights reserved.