com.pivotal.gemfirexd.internal.client.net

## Class NetConnection

- java.lang.Object
- - com.pivotal.gemfirexd.internal.client.am.Connection
  - - com.pivotal.gemfirexd.internal.client.net.NetConnection

All Implemented Interfaces:
  ConnectionCallbackInterface, AutoCloseable, Connection, Wrapper

Direct Known Subclasses:
  NetConnection40

    public abstract class NetConnection
    extends Connection

### Nested Class Summary

Nested Classes
`static class` `NetConnection.ConnectionCreator`
`static class` `NetConnection.DSConnectionInfo` Simple structure to encapsulate the network-servers in a distributed system, and statements to be used against locators/servers to obtain load-balanced connections etc.

### Nested classes/interfaces inherited from class com.pivotal.gemfirexd.internal.client.am.Connection

`Connection.FailoverStatus`

### Field Summary

Fields
`static Pattern` `addrPat_` The pattern to extract addresses from the result of GET_ALLSERVERS_AND_PREFSERVER procedure; format is: host1/addr1[port1]{kind1},host2/addr2[port2]{kind2},...
`static String` `BUCKET_AND_SERVER_PROC_QUERY`
`protected byte[]` `cnntkn_`
`protected String` `connServer`
`protected String` `connUrl` The original host:port given for this connection.
`protected String` `connUrl2` The counterpart of `connUrl` having hostname if `connUrl` has address and address if `connUrl` has hostname.
`byte[]` `crrtkn_`
`protected int` `currXACallInfoOffset_`
`static String[]` `failoverSQLStateArray` array of SQLState strings that denote failover should be done
`CallableStatement` `getBucketToServerDetails_` For single hop this statement would be used to re-fetch the bucket locations on the server.
`boolean` `gotException_`
`protected Hashtable` `indoubtTransactions_`
`static int` `MAX_SERVER_LIMIT` The maximum number of servers that are retained before the non-responsive ones are purged.
`protected static com.pivotal.gemfirexd.internal.shared.common.i18n.MessageUtil` `msgutil`
`protected NetAgent` `netAgent_`
`protected int` `pendingEndXACallinfoOffset_`
`protected static com.pivotal.gemfirexd.internal.shared.common.sanity.SanityManager.PrintWriterFactory` `pwFactory`
`static Random` `rand`
`protected boolean` `readOnlyTransaction_`
`protected int` `securityMechanism_`
`protected boolean` `statementFailover_` Indicates if this is connection is created during a failover retry so as to enable setting the posDup flag on server for current statement.
`protected int` `targetAgent_`
`protected int` `targetCmnappc_`
`protected int` `targetCmntcpip_`
`protected int` `targetRdb_`
`protected int` `targetRsyncmgr_`
`int` `targetSecmgr_`
`String` `targetSrvclsnm_`
`protected String` `targetSrvnam_`
`String` `targetSrvrlslv_`
`protected int` `targetSyncptmgr_`
`protected int` `targetXamgr_`
`protected NetXAResource` `xares_`

### Fields inherited from class com.pivotal.gemfirexd.internal.client.am.Connection

`agent_, alternateNetServers_, autoCommit_, clientSSLMode_, commBufferSize_, currentSchemaName_, currTXID, databaseMetaData_, databaseName_, dataSource_, DEFAULT_LOGIN_TIMEOUT, DEFAULT_SINGLE_HOP_MAX_CONN_PER_SERVER, defaultIsolation_, disableCancel_, disableStreaming_, disableTXBatching_, dncGeneratedSavepointId_, dncGeneratedSavepointNamePrefix__, doSetSchema_, encryptionManager_, executionSequence, INFINITE_LOGIN_TIMEOUT, inUnitOfWork_, isolation_, isXAConnection_, jdbcReadOnly_, keepAliveCnt_, keepAliveIdle_, keepAliveIntvl_, loadBalance_, lobProcs, loginTimeout_, ncjBatchSize_, ncjCacheSize_, portNumber_, prevSuccessfulSeq, productID_, queryHDFS_, resetConnectionAtFirstSql_, retrieveMessageText_, serverModifyLevel_, serverNameIP_, serverReleaseLevel_, serverVersion, serverVersionLevel_, SINGLE_HOP_MAX_CONN_PER_SERVER, singleHopAttempted, singleHopEnabled_, skipConstraints_, skipListeners_, skipLocks_, successfulExecutionSequence, syncCommits_, TRANSACTION_UNKNOWN, useBoundedQueuePool_, user_, XA_T0_NOT_ASSOCIATED, XA_T1_ASSOCIATED, xaHostVersion_`

### Fields inherited from interface java.sql.Connection

`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

### Constructor Summary

Constructors
Constructor and Description
`NetConnection(NetLogWriter netLogWriter, ClientBaseDataSource dataSource, String user, String password)`
`NetConnection(NetLogWriter netLogWriter, int driverManagerLoginTimeout, String serverName, int portNumber, String databaseName, Properties properties)`
`NetConnection(NetLogWriter netLogWriter, String ipaddr, int portNumber, ClientBaseDataSource dataSource, boolean isXAConn)`
`NetConnection(NetLogWriter netLogWriter, String databaseName, Properties properties)`
`NetConnection(NetLogWriter netLogWriter, String user, String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn)`

`NetConnection(NetLogWriter netLogWriter, String user, String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc)`
This constructor is called from the ClientPooledConnection object to enable the NetConnection to pass `this` on to the associated prepared statement object thus enabling the prepared statement object to inturn raise the statement events to the ClientPooledConnection object

### Method Summary

Methods
`void` `addSpecialRegisters(String s)`
`protected boolean` `allowCloseInUOW_()` Check if the connection can be closed when there are uncommitted operations.
`protected boolean` `allowLocalCommitRollback_()`
`protected int` `checkAlternateServerHasEqualOrHigherProductLevel(ProductLevel orgLvl, int orgServerType)`
`void` `close()` closes underlying connection and associated resource.
`void` `closeForReuse()` Invalidates connection but keeps socket open.
`void` `closeResources()` closes resources connection will be not available for reuse.
`void` `closeX()` closes underlying connection and associated resource.
`void` `completeConnect()`
`protected void` `completeReset(boolean isDeferredReset)`
`protected void` `constructCrrtkn()`
`NetAgent` `createNewAgentOrReset(LogWriter logWriter, int loginTimeout, String thisUrl, String serverName, int[] port, int clientSSLMode, Set failedUrls, SqlException failoverEx, Connection.FailoverStatus status)`
`protected boolean` `doCloseStatementsOnClose_()`
`Connection.FailoverStatus` `doFailoverOnException(String sqlState, int errorCode, Exception thrownEx)`
`void` `doResetNow()`
`protected void` `finalize()`
`void` `flowConnect(String password, int securityMechanism, boolean doFailover)`
`protected boolean` `flowReconnect(String password, int securityMechanism)`
`protected void` `flowSimpleConnect()`
`int` `getAGENT()`
`protected int` `getCachedIsolation()`
`int` `getCMNTCPIP()`
`protected byte[]` `getCnnToken()`
`Properties` `getConnectionProperties()`
`protected Properties` `getConnectionProperties(Properties incomingProps)`
`NetConnection.DSConnectionInfo` `getDSConnectionInfo()`
`EncryptionManager` `getEncryptionManager()`
`static Connection.FailoverStatus` `getFailoverStatus(String sqlState, int errorCode, Exception thrownEx)`
`InputStream` `getInputStream()`
`OutputStream` `getOutputStream()`
`String` `getProductID()`
`int` `getRDB()`
`int` `getRSYNCMGR()`
`int` `getSavePointToRollbackTo()`
`int` `getSECMGR()`
`int` `getSecurityMechanism()`
`int` `getSendBufferSize()`
`protected short` `getSequenceNumber()`
`String` `getServerLocation()`
`protected static String` `getServerUrl(String serverName, int port)`
`protected static String` `getServerUrl(String serverName, String port)`
`protected int` `getSocketAndInputOutputStreams(String server, int port, int clientSSLMode)`
`int` `getSQLAM()`
`int` `getSYNCPTMGR()`
`byte[]` `getTargetPublicKey()`
`int` `getTimeout()`
`TxID` `getTxID()`
`int` `getXAMGR()`
`Set` `handleFailover(Set failedUrls, SqlException sqle)`
`protected Set` `handleFailover(Set failedUrls, SqlException ex, Connection.FailoverStatus status)`
`boolean` `isConnectionNull()`
`protected boolean` `isGlobalPending_()`
`boolean` `isSnappyDRDAProtocol()`
`protected void` `markClosed_()`
`protected Agent` `newAgent_(LogWriter logWriter, int loginTimeout, String serverName, int portNumber, int clientSSLMode, Properties incomingProps)`
`protected CallableStatement` `newCallableStatement_(String sql, int type, int concurrency, int holdability)`
`protected DatabaseMetaData` `newDatabaseMetaData_()`
`protected PreparedStatement` `newPositionedUpdatePreparedStatement_(String sql, Section section)`
`protected PreparedStatement` `newPreparedStatement_(String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes)`
`SectionManager` `newSectionManager(String collection, Agent agent, String databaseName)`
`protected Statement` `newStatement_(int type, int concurrency, int holdability)`
`protected void` `preAgentInitialize(String password, ClientBaseDataSource dataSource, Properties properties)`
`void` `readCommitSubstitute_()`
`void` `readLocalCommit_()`
`void` `readLocalRollback_()`
`void` `readLocalXACommit_()`
`void` `readLocalXARollback_()`
`void` `readLocalXAStart_()`
`void` `readTransactionStart()`
`protected void` `readXACommit_()` Invokes readCommit on NetXAConnection
`protected void` `readXARollback_()` Invokes writeRollback on NetXAConnection
`protected void` `reset_(LogWriter logWriter)`
`protected void` `resetCallableStatement_(CallableStatement cs, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
`void` `resetNetConnection(LogWriter logWriter)`
`protected void` `resetPreparedStatement_(PreparedStatement ps, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes)`
`protected void` `resetStatement_(Statement statement, int type, int concurrency, int holdability)`
`boolean` `serverSupportsLayerBStreaming()`
`protected boolean` `serverSupportsLocators()` Checks whether the server supports locators for large objects.
`boolean` `serverSupportsQryclsimp()` Check whether the server has full support for the QRYCLSIMP parameter in OPNQRY.
`protected boolean` `serverSupportsUDTs()` Check whether the server supports UDTs
`void` `setBaseConnection(Connection conn)`
`void` `setConnectionNull(boolean connectionNull)`
`void` `setIndoubtTransactions(Hashtable indoubtTransactions)`
`void` `setInputStream(InputStream inputStream)`
`void` `setOutputStream(OutputStream outputStream)`
`protected void` `setReadOnlyTransactionFlag(boolean flag)`
`void` `setSendBufferSize(int size)`
`void` `setServerURL(String serverURL)`
`void` `setServerVersion(com.gemstone.gemfire.internal.shared.Version serverVersion)`
`void` `setTimeout(int loginTimeout)`
`void` `setTXID(long memberIdOfTxid, long uniqIdOfTxId)`
`protected boolean` `supportsSessionDataCaching()` Check whether the server supports session data caching
`String` `toString()`
`void` `updateRegionInfoForCommit(int prid, int bid)`
`boolean` `willAutoCommitGenerateFlow()`
`void` `writeCommitSubstitute_()`
`void` `writeLocalCommit_()`
`void` `writeLocalRollback_()`
`void` `writeLocalXACommit_()`
`void` `writeLocalXARollback_()`
`void` `writeLocalXAStart_()`
`void` `writeTransactionStart(Statement statement)`
`protected void` `writeXACommit_()` Invokes write commit on NetXAConnection
`protected void` `writeXARollback_()` Invokes writeRollback on NetXAConnection
`protected void` `writeXATransactionStart(Statement statement)`

### Methods inherited from class com.pivotal.gemfirexd.internal.client.am.Connection

`accumulate440WarningForMessageProcFailure, accumulate444WarningForMessageProcFailure, accumulateWarning, cancelDisabled, checkForClosedConnection, clearWarnings, clearWarningsX, closeForReuse, commit, completeAbnormalUnitOfWork, completeAbnormalUnitOfWork, completeChainBreakingDisconnect, completeInitialPiggyBackIsolation, completeInitialPiggyBackSchema, completeLocalCommit, completeLocalRollback, completePiggyBackIsolation, completePiggyBackSchema, completeReset, completeReset, completeServerVersion, completeSpecificRollback, completeSqlca, createBlob, createClob, createStatement, createStatement, createStatement, flowAutoCommit, flowCommit, flowRollback, getAutoCommit, getCatalog, getCurrentSchemaName, getHoldability, getMetaData, getServerVersion, getTransactionID, getTransactionIsolation, getTransactionIsolationX, getTypeMap, getWarnings, getXAState, incrementAndGetExecutionSequence, init, initConnection, initialize, isClosed, isClosedX, isOpen, isPhysicalConnClosed, isReadOnly, isSingleHopEnabled, isXAConnection, lightReset, locatorProcedureCall, markClosed, markClosed, markOpen, nativeSQL, nativeSQLX, prepareCall, prepareCall, prepareCall, prepareMessageProc, preparePositionedUpdateStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, readCommit, readRollback, releaseSavepoint, reset, resetConnection, resetPrepareCall, resetPrepareStatement, resetStatement, rollback, rollback, setAutoCommit, setAutoCommitX, setCatalog, setHoldability, setInUnitOfWork, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTransactionIsolationX, setTypeMap, setXAState, transactionInProgress, writeCommit, writeRollback`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.sql.Connection

`abort, createArrayOf, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, getNetworkTimeout, getSchema, isValid, setClientInfo, setClientInfo, setNetworkTimeout, setSchema`

### Methods inherited from interface java.sql.Wrapper

`isWrapperFor, unwrap`

### Field Detail

#### msgutil

    protected static com.pivotal.gemfirexd.internal.shared.common.i18n.MessageUtil msgutil

#### netAgent_

    protected NetAgent netAgent_

#### pendingEndXACallinfoOffset_

    protected int pendingEndXACallinfoOffset_

#### targetAgent_

    protected int targetAgent_

#### targetCmntcpip_

    protected int targetCmntcpip_

#### targetRdb_

    protected int targetRdb_

#### targetSecmgr_

    public int targetSecmgr_

#### targetCmnappc_

    protected int targetCmnappc_

#### targetXamgr_

    protected int targetXamgr_

#### targetSyncptmgr_

    protected int targetSyncptmgr_

#### targetRsyncmgr_

    protected int targetRsyncmgr_

#### targetSrvclsnm_

    public String targetSrvclsnm_

#### targetSrvnam_

    protected String targetSrvnam_

#### targetSrvrlslv_

    public String targetSrvrlslv_

#### crrtkn_

    public byte[] crrtkn_

#### securityMechanism_

    protected int securityMechanism_

#### cnntkn_

    protected byte[] cnntkn_

#### xares_

    protected NetXAResource xares_

#### indoubtTransactions_

    protected Hashtable indoubtTransactions_

#### currXACallInfoOffset_

    protected int currXACallInfoOffset_

#### readOnlyTransaction_

    protected boolean readOnlyTransaction_

#### rand

    public static final Random rand

#### MAX_SERVER_LIMIT

    public static final int MAX_SERVER_LIMIT

The maximum number of servers that are retained before the non-responsive ones are purged. The total number of servers can exceed this limit if all are responsive.

See Also:
  Constant Field Values

#### statementFailover_

    protected boolean statementFailover_

Indicates if this is connection is created during a failover retry so as to enable setting the posDup flag on server for current statement. Currently the `CodePoint.RDBALWUPD` byte doubles as a flag to indicate failover retry to the server.

#### connUrl

    protected String connUrl

The original host:port given for this connection.

#### connUrl2

    protected String connUrl2

The counterpart of `connUrl` having hostname if `connUrl` has address and address if `connUrl` has hostname.

#### connServer

    protected String connServer

#### getBucketToServerDetails_

    public CallableStatement getBucketToServerDetails_

For single hop this statement would be used to re-fetch the bucket locations on the server.

#### BUCKET_AND_SERVER_PROC_QUERY

    public static final String BUCKET_AND_SERVER_PROC_QUERY

See Also:
  Constant Field Values

#### failoverSQLStateArray

    public static final String[] failoverSQLStateArray

array of SQLState strings that denote failover should be done

#### pwFactory

    protected static final com.pivotal.gemfirexd.internal.shared.common.sanity.SanityManager.PrintWriterFactory pwFactory

#### addrPat_

    public static final Pattern addrPat_

The pattern to extract addresses from the result of GET_ALLSERVERS_AND_PREFSERVER procedure; format is: host1/addr1[port1]{kind1},host2/addr2[port2]{kind2},...

#### gotException_

    public boolean gotException_

### Constructor Detail

#### NetConnection

    public NetConnection(NetLogWriter netLogWriter,
                 String databaseName,
                 Properties properties)
                  throws SqlException

Throws:
  `SqlException`

#### NetConnection

    public NetConnection(NetLogWriter netLogWriter,
                 ClientBaseDataSource dataSource,
                 String user,
                 String password)
                  throws SqlException

Throws:
  `SqlException`

#### NetConnection

    public NetConnection(NetLogWriter netLogWriter,
                 int driverManagerLoginTimeout,
                 String serverName,
                 int portNumber,
                 String databaseName,
                 Properties properties)
                  throws SqlException

Throws:
  `SqlException`

#### NetConnection

    public NetConnection(NetLogWriter netLogWriter,
                 String user,
                 String password,
                 ClientBaseDataSource dataSource,
                 int rmId,
                 boolean isXAConn)
                  throws SqlException

Throws:
  `SqlException`

#### NetConnection

    public NetConnection(NetLogWriter netLogWriter,
                 String ipaddr,
                 int portNumber,
                 ClientBaseDataSource dataSource,
                 boolean isXAConn)
                  throws SqlException

Throws:
  `SqlException`

#### NetConnection

    public NetConnection(NetLogWriter netLogWriter,
                 String user,
                 String password,
                 ClientBaseDataSource dataSource,
                 int rmId,
                 boolean isXAConn,
                 ClientPooledConnection cpc)
                  throws SqlException

This constructor is called from the ClientPooledConnection object to enable the NetConnection to pass `this` on to the associated prepared statement object thus enabling the prepared statement object to inturn raise the statement events to the ClientPooledConnection object

Parameters:
  `netLogWriter` - NetLogWriter object associated with this connection
  `user` - user id for this connection
  `password` - password for this connection
  `dataSource` - The DataSource object passed from the PooledConnection object from which this constructor was called
  `rmId` - The Resource manager ID for XA Connections
  `isXAConn` - true if this is a XA connection
  `cpc` - The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object
Throws:
  `SqlException`

### Method Detail

#### getServerUrl

    protected static final String getServerUrl(String serverName,
                      String port)

#### getServerUrl

    protected static final String getServerUrl(String serverName,
                      int port)

#### preAgentInitialize

    protected void preAgentInitialize(String password,
                          ClientBaseDataSource dataSource,
                          Properties properties)
                               throws SqlException

Specified by:
  `preAgentInitialize` in class `Connection`
Throws:
  `SqlException`

#### resetNetConnection

    public void resetNetConnection(LogWriter logWriter)
                            throws SqlException

Throws:
  `SqlException`

#### reset_

    protected void reset_(LogWriter logWriter)
                   throws SqlException

Specified by:
  `reset_` in class `Connection`
Throws:
  `SqlException`

#### addSpecialRegisters

    public void addSpecialRegisters(String s)

Specified by:
  `addSpecialRegisters` in class `Connection`

#### completeConnect

    public void completeConnect()
                         throws SqlException

Overrides:
  `completeConnect` in class `Connection`
Throws:
  `SqlException`

#### completeReset

    protected void completeReset(boolean isDeferredReset)
                          throws SqlException

Throws:
  `SqlException`

#### flowConnect

    public void flowConnect(String password,
                   int securityMechanism,
                   boolean doFailover)
                     throws SqlException

Throws:
  `SqlException`

#### flowSimpleConnect

    protected void flowSimpleConnect()
                              throws SqlException

Throws:
  `SqlException`

#### flowReconnect

    protected boolean flowReconnect(String password,
                        int securityMechanism)
                             throws SqlException

Throws:
  `SqlException`

#### finalize

    protected void finalize()
                     throws Throwable

Overrides:
  `finalize` in class `Connection`
Throws:
  `Throwable`

#### getCnnToken

    protected byte[] getCnnToken()

#### getSequenceNumber

    protected short getSequenceNumber()

#### getConnectionProperties

    protected Properties getConnectionProperties(Properties incomingProps)

#### getConnectionProperties

    public Properties getConnectionProperties()

Specified by:
  `getConnectionProperties` in class `Connection`

#### handleFailover

    protected final Set handleFailover(Set failedUrls,
                     SqlException ex,
                     Connection.FailoverStatus status)
                                throws SqlException

Throws:
  `SqlException`

#### handleFailover

    public final Set handleFailover(Set failedUrls,
                     SqlException sqle)
                             throws SqlException

Specified by:
  `handleFailover` in class `Connection`
Throws:
  `SqlException`

#### doFailoverOnException

    public final Connection.FailoverStatus doFailoverOnException(String sqlState,
                                                  int errorCode,
                                                  Exception thrownEx)

Specified by:
  `doFailoverOnException` in class `Connection`

#### getFailoverStatus

    public static Connection.FailoverStatus getFailoverStatus(String sqlState,
                                              int errorCode,
                                              Exception thrownEx)

#### getServerLocation

    public final String getServerLocation()

Specified by:
  `getServerLocation` in class `Connection`

#### toString

    public final String toString()

Overrides:
  `toString` in class `Object`

#### setTimeout

    public final void setTimeout(int loginTimeout)
                          throws SQLException

Throws:
  `SQLException`

#### getTimeout

    public final int getTimeout()
                         throws SQLException

Throws:
  `SQLException`

#### setSendBufferSize

    public final void setSendBufferSize(int size)
                                 throws SQLException

Throws:
  `SQLException`

#### getSendBufferSize

    public final int getSendBufferSize()
                                throws SQLException

Throws:
  `SQLException`

#### getCachedIsolation

    protected final int getCachedIsolation()

#### createNewAgentOrReset

    public final NetAgent createNewAgentOrReset(LogWriter logWriter,
                                 int loginTimeout,
                                 String thisUrl,
                                 String serverName,
                                 int[] port,
                                 int clientSSLMode,
                                 Set failedUrls,
                                 SqlException failoverEx,
                                 Connection.FailoverStatus status)
                                         throws SqlException

Throws:
  `SqlException`

#### newAgent_

    protected final Agent newAgent_(LogWriter logWriter,
                  int loginTimeout,
                  String serverName,
                  int portNumber,
                  int clientSSLMode,
                  Properties incomingProps)
                             throws SqlException

Specified by:
  `newAgent_` in class `Connection`
Throws:
  `SqlException`

#### newStatement_

    protected Statement newStatement_(int type,
                          int concurrency,
                          int holdability)
                               throws SqlException

Specified by:
  `newStatement_` in class `Connection`
Throws:
  `SqlException`

#### resetStatement_

    protected void resetStatement_(Statement statement,
                       int type,
                       int concurrency,
                       int holdability)
                            throws SqlException

Specified by:
  `resetStatement_` in class `Connection`
Throws:
  `SqlException`

#### newPositionedUpdatePreparedStatement_

    protected PreparedStatement newPositionedUpdatePreparedStatement_(String sql,
                                                          Section section)
                                                               throws SqlException

Specified by:
  `newPositionedUpdatePreparedStatement_` in class `Connection`
Throws:
  `SqlException`

#### newPreparedStatement_

    protected PreparedStatement newPreparedStatement_(String sql,
                                          int type,
                                          int concurrency,
                                          int holdability,
                                          int autoGeneratedKeys,
                                          String[] columnNames,
                                          int[] columnIndexes)
                                               throws SqlException

Specified by:
  `newPreparedStatement_` in class `Connection`
Throws:
  `SqlException`

#### resetPreparedStatement_

    protected void resetPreparedStatement_(PreparedStatement ps,
                               String sql,
                               int resultSetType,
                               int resultSetConcurrency,
                               int resultSetHoldability,
                               int autoGeneratedKeys,
                               String[] columnNames,
                               int[] columnIndexes)
                                    throws SqlException

Specified by:
  `resetPreparedStatement_` in class `Connection`
Throws:
  `SqlException`

#### newCallableStatement_

    protected CallableStatement newCallableStatement_(String sql,
                                          int type,
                                          int concurrency,
                                          int holdability)
                                               throws SqlException

Specified by:
  `newCallableStatement_` in class `Connection`
Throws:
  `SqlException`

#### resetCallableStatement_

    protected void resetCallableStatement_(CallableStatement cs,
                               String sql,
                               int resultSetType,
                               int resultSetConcurrency,
                               int resultSetHoldability)
                                    throws SqlException

Specified by:
  `resetCallableStatement_` in class `Connection`
Throws:
  `SqlException`

#### newDatabaseMetaData_

    protected DatabaseMetaData newDatabaseMetaData_()

Specified by:
  `newDatabaseMetaData_` in class `Connection`

#### constructCrrtkn

    protected void constructCrrtkn()
                            throws SqlException

Throws:
  `SqlException`

#### getSQLAM

    public int getSQLAM()

#### getAGENT

    public int getAGENT()

#### getCMNTCPIP

    public int getCMNTCPIP()

#### getRDB

    public int getRDB()

#### getSECMGR

    public int getSECMGR()

#### getXAMGR

    public int getXAMGR()

#### getSYNCPTMGR

    public int getSYNCPTMGR()

#### getRSYNCMGR

    public int getRSYNCMGR()

#### writeCommitSubstitute_

    public void writeCommitSubstitute_()
                                throws SqlException

Specified by:
  `writeCommitSubstitute_` in class `Connection`
Throws:
  `SqlException`

#### readCommitSubstitute_

    public void readCommitSubstitute_()
                               throws SqlException

Specified by:
  `readCommitSubstitute_` in class `Connection`
Throws:
  `SqlException`

#### writeLocalXAStart_

    public void writeLocalXAStart_()
                            throws SqlException

Specified by:
  `writeLocalXAStart_` in class `Connection`
Throws:
  `SqlException`

#### readLocalXAStart_

    public void readLocalXAStart_()
                           throws SqlException

Specified by:
  `readLocalXAStart_` in class `Connection`
Throws:
  `SqlException`

#### writeLocalXACommit_

    public void writeLocalXACommit_()
                             throws SqlException

Specified by:
  `writeLocalXACommit_` in class `Connection`
Throws:
  `SqlException`

#### readLocalXACommit_

    public void readLocalXACommit_()
                            throws SqlException

Specified by:
  `readLocalXACommit_` in class `Connection`
Throws:
  `SqlException`

#### writeLocalXARollback_

    public void writeLocalXARollback_()
                               throws SqlException

Specified by:
  `writeLocalXARollback_` in class `Connection`
Throws:
  `SqlException`

#### readLocalXARollback_

    public void readLocalXARollback_()
                              throws SqlException

Specified by:
  `readLocalXARollback_` in class `Connection`
Throws:
  `SqlException`

#### writeLocalCommit_

    public void writeLocalCommit_()
                           throws SqlException

Specified by:
  `writeLocalCommit_` in class `Connection`
Throws:
  `SqlException`

#### readLocalCommit_

    public void readLocalCommit_()
                          throws SqlException

Specified by:
  `readLocalCommit_` in class `Connection`
Throws:
  `SqlException`

#### writeLocalRollback_

    public void writeLocalRollback_()
                             throws SqlException

Specified by:
  `writeLocalRollback_` in class `Connection`
Throws:
  `SqlException`

#### readLocalRollback_

    public void readLocalRollback_()
                            throws SqlException

Specified by:
  `readLocalRollback_` in class `Connection`
Throws:
  `SqlException`

#### markClosed_

    protected void markClosed_()

Specified by:
  `markClosed_` in class `Connection`

#### isGlobalPending_

    protected boolean isGlobalPending_()

Specified by:
  `isGlobalPending_` in class `Connection`

#### doCloseStatementsOnClose_

    protected boolean doCloseStatementsOnClose_()

Specified by:
  `doCloseStatementsOnClose_` in class `Connection`

#### allowCloseInUOW_

    protected boolean allowCloseInUOW_()

Check if the connection can be closed when there are uncommitted operations.

Specified by:
  `allowCloseInUOW_` in class `Connection`
Returns:
  if this connection can be closed when it has uncommitted operations, `true`; otherwise, `false`

#### allowLocalCommitRollback_

    protected boolean allowLocalCommitRollback_()

Specified by:
  `allowLocalCommitRollback_` in class `Connection`

#### setInputStream

    public void setInputStream(InputStream inputStream)

#### setOutputStream

    public void setOutputStream(OutputStream outputStream)

#### getInputStream

    public InputStream getInputStream()

Specified by:
  `getInputStream` in class `Connection`

#### getOutputStream

    public OutputStream getOutputStream()

Specified by:
  `getOutputStream` in class `Connection`

#### writeTransactionStart

    public void writeTransactionStart(Statement statement)
                               throws SqlException

Overrides:
  `writeTransactionStart` in class `Connection`
Throws:
  `SqlException`

#### readTransactionStart

    public void readTransactionStart()
                              throws SqlException

Overrides:
  `readTransactionStart` in class `Connection`
Throws:
  `SqlException`

#### setIndoubtTransactions

    public void setIndoubtTransactions(Hashtable indoubtTransactions)

#### setReadOnlyTransactionFlag

    protected void setReadOnlyTransactionFlag(boolean flag)

#### newSectionManager

    public SectionManager newSectionManager(String collection,
                                   Agent agent,
                                   String databaseName)

Specified by:
  `newSectionManager` in class `Connection`

#### getSocketAndInputOutputStreams

    protected int getSocketAndInputOutputStreams(String server,
                                     int port,
                                     int clientSSLMode)

#### checkAlternateServerHasEqualOrHigherProductLevel

    protected int checkAlternateServerHasEqualOrHigherProductLevel(ProductLevel orgLvl,
                                                       int orgServerType)

#### willAutoCommitGenerateFlow

    public boolean willAutoCommitGenerateFlow()

Overrides:
  `willAutoCommitGenerateFlow` in class `Connection`

#### getSecurityMechanism

    public int getSecurityMechanism()

#### getEncryptionManager

    public EncryptionManager getEncryptionManager()

#### getTargetPublicKey

    public byte[] getTargetPublicKey()

#### getProductID

    public String getProductID()

#### doResetNow

    public void doResetNow()
                    throws SqlException

Throws:
  `SqlException`

#### isConnectionNull

    public boolean isConnectionNull()

Returns:
  Returns the connectionNull.

#### setConnectionNull

    public void setConnectionNull(boolean connectionNull)

Parameters:
  `connectionNull` - The connectionNull to set.

#### serverSupportsQryclsimp

    public final boolean serverSupportsQryclsimp()

Check whether the server has full support for the QRYCLSIMP parameter in OPNQRY.

Returns:
  true if QRYCLSIMP is fully supported

#### serverSupportsLayerBStreaming

    public final boolean serverSupportsLayerBStreaming()

#### supportsSessionDataCaching

    protected final boolean supportsSessionDataCaching()

Check whether the server supports session data caching

Specified by:
  `supportsSessionDataCaching` in class `Connection`
Returns:
  true session data caching is supported

#### serverSupportsUDTs

    protected final boolean serverSupportsUDTs()

Check whether the server supports UDTs

Returns:
  true if UDTs are supported

#### serverSupportsLocators

    protected final boolean serverSupportsLocators()

Checks whether the server supports locators for large objects.

Specified by:
  `serverSupportsLocators` in class `Connection`
Returns:
  `true` if LOB locators are supported.

#### close

    public void close()
               throws SQLException

closes underlying connection and associated resource.

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Connection`
Overrides:
  `close` in class `Connection`
Throws:
  `SQLException`

#### closeX

    public void closeX()
                throws SQLException

closes underlying connection and associated resource.

Overrides:
  `closeX` in class `Connection`
Throws:
  `SQLException`

#### closeForReuse

    public void closeForReuse()
                       throws SqlException

Invalidates connection but keeps socket open.

Throws:
  `SqlException`

#### closeResources

    public void closeResources()
                        throws SQLException

closes resources connection will be not available for reuse.

Overrides:
  `closeResources` in class `Connection`
Throws:
  `SQLException`

#### writeXACommit_

    protected void writeXACommit_()
                           throws SqlException

Invokes write commit on NetXAConnection

Specified by:
  `writeXACommit_` in class `Connection`
Throws:
  `SqlException`

#### readXACommit_

    protected void readXACommit_()
                          throws SqlException

Invokes readCommit on NetXAConnection

Specified by:
  `readXACommit_` in class `Connection`
Throws:
  `SqlException`

#### writeXARollback_

    protected void writeXARollback_()
                             throws SqlException

Invokes writeRollback on NetXAConnection

Specified by:
  `writeXARollback_` in class `Connection`
Throws:
  `SqlException`

#### readXARollback_

    protected void readXARollback_()
                            throws SqlException

Invokes writeRollback on NetXAConnection

Specified by:
  `readXARollback_` in class `Connection`
Throws:
  `SqlException`

#### writeXATransactionStart

    protected void writeXATransactionStart(Statement statement)
                                    throws SqlException

Specified by:
  `writeXATransactionStart` in class `Connection`
Throws:
  `SqlException`

#### getDSConnectionInfo

    public NetConnection.DSConnectionInfo getDSConnectionInfo()

#### setBaseConnection

    public void setBaseConnection(Connection conn)

#### setServerURL

    public void setServerURL(String serverURL)

#### getSavePointToRollbackTo

    public int getSavePointToRollbackTo()

#### setTXID

    public void setTXID(long memberIdOfTxid,
               long uniqIdOfTxId)

#### getTxID

    public TxID getTxID()

#### setServerVersion

    public void setServerVersion(com.gemstone.gemfire.internal.shared.Version serverVersion)

#### isSnappyDRDAProtocol

    public final boolean isSnappyDRDAProtocol()

#### updateRegionInfoForCommit

    public void updateRegionInfoForCommit(int prid,
                                 int bid)