public class BaseContext extends Object implements com.singlestore.jdbc.client.Context
| Modifier and Type | Field and Description |
|---|---|
protected int |
serverStatus |
| Constructor and Description |
|---|
BaseContext(InitialHandshakePacket handshake,
long clientCapabilities,
Configuration conf,
ExceptionFactory exceptionFactory,
com.singlestore.jdbc.client.PrepareCache prepareCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStateFlag(int state)
Indicate connection state (for pooling)
|
boolean |
canSkipMeta()
Can server skip prepared statement metadata
|
Configuration |
getConf()
Get connection configuration
|
String |
getDatabase()
Get current connection database
|
ExceptionFactory |
getExceptionFactory()
Get connection exception factory
|
com.singlestore.jdbc.client.PrepareCache |
getPrepareCache()
get LRU prepare cache object
|
byte[] |
getSeed()
Get connection initial seed
|
long |
getServerCapabilities() |
int |
getServerStatus()
Get server connection state
|
int |
getStateFlag()
return connection current state change flag
|
long |
getThreadId()
return current thread id
|
int |
getTransactionIsolationLevel()
Get connection transaction isolation level
|
int |
getWarning()
has server warnings
|
boolean |
hasClientCapability(long flag)
has client capability
|
boolean |
hasServerCapability(long flag)
has server capability
|
boolean |
isEofDeprecated()
does protocol remove EOF in exchanges
|
boolean |
isExtendedInfo()
Does server metadata exchange extended information
|
boolean |
permitPipeline()
Does server and client permit pipeline
|
void |
resetPrepareCache()
Reset prepare cache (after a failover)
|
void |
resetStateFlag()
reset connection state change flag
|
void |
setDatabase(String database)
set current database context
|
void |
setServerStatus(int serverStatus)
Set server connection state
|
void |
setTransactionIsolationLevel(int transactionIsolationLevel)
Set current connection transaction isolation level
|
void |
setWarning(int warning)
set server state warning number
|
public BaseContext(InitialHandshakePacket handshake, long clientCapabilities, Configuration conf, ExceptionFactory exceptionFactory, com.singlestore.jdbc.client.PrepareCache prepareCache)
public long getThreadId()
com.singlestore.jdbc.client.ContextgetThreadId in interface com.singlestore.jdbc.client.Contextpublic byte[] getSeed()
com.singlestore.jdbc.client.ContextgetSeed in interface com.singlestore.jdbc.client.Contextpublic boolean hasServerCapability(long flag)
com.singlestore.jdbc.client.ContexthasServerCapability in interface com.singlestore.jdbc.client.Contextflag - capability to checkpublic boolean hasClientCapability(long flag)
com.singlestore.jdbc.client.ContexthasClientCapability in interface com.singlestore.jdbc.client.Contextflag - capability to checkpublic boolean permitPipeline()
com.singlestore.jdbc.client.ContextpermitPipeline in interface com.singlestore.jdbc.client.Contextpublic long getServerCapabilities()
getServerCapabilities in interface com.singlestore.jdbc.client.Contextpublic int getServerStatus()
com.singlestore.jdbc.client.ContextgetServerStatus in interface com.singlestore.jdbc.client.Contextpublic void setServerStatus(int serverStatus)
com.singlestore.jdbc.client.ContextsetServerStatus in interface com.singlestore.jdbc.client.ContextserverStatus - server statuspublic String getDatabase()
com.singlestore.jdbc.client.ContextgetDatabase in interface com.singlestore.jdbc.client.Contextpublic void setDatabase(String database)
com.singlestore.jdbc.client.ContextsetDatabase in interface com.singlestore.jdbc.client.Contextdatabase - databasepublic boolean isEofDeprecated()
com.singlestore.jdbc.client.ContextisEofDeprecated in interface com.singlestore.jdbc.client.Contextpublic boolean isExtendedInfo()
com.singlestore.jdbc.client.ContextisExtendedInfo in interface com.singlestore.jdbc.client.Contextpublic boolean canSkipMeta()
com.singlestore.jdbc.client.ContextcanSkipMeta in interface com.singlestore.jdbc.client.Contextpublic int getWarning()
com.singlestore.jdbc.client.ContextgetWarning in interface com.singlestore.jdbc.client.Contextpublic void setWarning(int warning)
com.singlestore.jdbc.client.ContextsetWarning in interface com.singlestore.jdbc.client.Contextwarning - warning numberpublic ExceptionFactory getExceptionFactory()
com.singlestore.jdbc.client.ContextgetExceptionFactory in interface com.singlestore.jdbc.client.Contextpublic Configuration getConf()
com.singlestore.jdbc.client.ContextgetConf in interface com.singlestore.jdbc.client.Contextpublic int getTransactionIsolationLevel()
com.singlestore.jdbc.client.ContextgetTransactionIsolationLevel in interface com.singlestore.jdbc.client.Contextpublic void setTransactionIsolationLevel(int transactionIsolationLevel)
com.singlestore.jdbc.client.ContextsetTransactionIsolationLevel in interface com.singlestore.jdbc.client.ContexttransactionIsolationLevel - new connection transaction isolation levelpublic com.singlestore.jdbc.client.PrepareCache getPrepareCache()
com.singlestore.jdbc.client.ContextgetPrepareCache in interface com.singlestore.jdbc.client.Contextpublic void resetPrepareCache()
com.singlestore.jdbc.client.ContextresetPrepareCache in interface com.singlestore.jdbc.client.Contextpublic int getStateFlag()
com.singlestore.jdbc.client.ContextgetStateFlag in interface com.singlestore.jdbc.client.Contextpublic void resetStateFlag()
com.singlestore.jdbc.client.ContextresetStateFlag in interface com.singlestore.jdbc.client.Contextpublic void addStateFlag(int state)
com.singlestore.jdbc.client.ContextaddStateFlag in interface com.singlestore.jdbc.client.Contextstate - indicate that some connection state has changedCopyright © 2023 SingleStore. All rights reserved.