public class ConnectionInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_MAX_IDLE_TIME_BEFORE_TERMINAL
Default maxIdleTimeBeforeTerminal.
|
static String |
ENABLE_QUICK_AUTO_BALANCE_PARAMS |
| Constructor and Description |
|---|
ConnectionInfo(PgConnection pgConnection,
Properties properties,
HostSpec hostSpec) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkConnectionCanBeClosed(long quickAutoBalanceStartTime)
Check whether the connection can be closed.
|
boolean |
checkConnectionIsValid()
Check whether a connection is valid.
|
boolean |
equals(Object o) |
String |
getAutoBalance() |
StatementCancelState |
getConnectionState() |
HostSpec |
getHostSpec()
get hostSpec
|
long |
getMaxIdleTimeBeforeTerminal() |
PgConnection |
getPgConnection() |
int |
hashCode() |
boolean |
isEnableQuickAutoBalance() |
static boolean |
parseEnableQuickAutoBalance(Properties properties)
Parse enableQuickAutoBalance.
|
static long |
parseMaxIdleTimeBeforeTerminal(Properties properties)
Parse maxIdleTimeBeforeTerminal.
|
void |
setConnectionState(StatementCancelState state) |
public static final long DEFAULT_MAX_IDLE_TIME_BEFORE_TERMINAL
public static final String ENABLE_QUICK_AUTO_BALANCE_PARAMS
public ConnectionInfo(PgConnection pgConnection, Properties properties, HostSpec hostSpec) throws PSQLException
PSQLExceptionpublic static boolean parseEnableQuickAutoBalance(Properties properties) throws PSQLException
properties - propertiesPSQLException - EnableQuickAutoBalance parsed failed.public static long parseMaxIdleTimeBeforeTerminal(Properties properties) throws PSQLException
properties - propertiesPSQLException - MaxIdleTimeBeforeTerminal parse failed.public StatementCancelState getConnectionState()
public void setConnectionState(StatementCancelState state)
public long getMaxIdleTimeBeforeTerminal()
public String getAutoBalance()
public PgConnection getPgConnection()
public boolean checkConnectionCanBeClosed(long quickAutoBalanceStartTime)
quickAutoBalanceStartTime - quickAutoBalance start timepublic boolean isEnableQuickAutoBalance()
public boolean checkConnectionIsValid()
public HostSpec getHostSpec()
Copyright © 2023 openGauss. All rights reserved.