Package com.ocient.jdbc
Class XGConnection
java.lang.Object
com.ocient.jdbc.XGConnection
- All Implemented Interfaces:
AutoCloseable,Connection,Wrapper
public class XGConnection extends Object implements Connection
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXGConnection.HandshakeTypestatic classXGConnection.Tls -
Field Summary
Fields Modifier and Type Field Description protected Stringclientprotected StringclientVersionprotected ArrayList<String>cmdcompsprotected StringconnectedIpprotected intconnectedPortprotected Stringdatabaseprotected StringdefaultSchemaprotected booleanforceprotected BufferedInputStreaminprotected StringipIntegermaxRowsprotected intnetworkTimeoutprotected booleanoneShotForceprotected StringoriginalIpprotected intoriginalPortprotected BufferedOutputStreamoutprotected intportNumprotected StringprotocolVersionprotected Stringpwdprotected XGResultSetrsprotected intsecondaryIndexprotected ArrayList<ArrayList<String>>secondaryInterfacesprotected StringserverVersionprotected longsetPsoprotected StringsetSchemaprotected XGConnection.Tlstlsprotected Map<String,Class<?>>typeMapprotected Stringurlprotected Stringuserprotected ArrayList<SQLWarning>warningsFields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Constructor Summary
Constructors Constructor Description XGConnection(String user, String pwd, int portNum, String url, String database, String protocolVersion, String clientVersion, boolean force, XGConnection.Tls tls, Properties properties)XGConnection(String user, String pwd, String ip, int portNum, String url, String database, String protocolVersion, String clientVersion, String force, XGConnection.Tls tls, Properties properties) -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
Field Details
-
in
-
out
-
rs
-
portNum
protected int portNum -
warnings
-
url
-
ip
-
originalIp
-
connectedIp
-
originalPort
protected int originalPort -
connectedPort
protected int connectedPort -
user
-
database
-
client
-
protocolVersion
-
clientVersion
-
serverVersion
-
setSchema
-
defaultSchema
-
setPso
protected long setPso -
maxRows
-
force
protected boolean force -
oneShotForce
protected boolean oneShotForce -
cmdcomps
-
secondaryInterfaces
-
secondaryIndex
protected int secondaryIndex -
networkTimeout
protected int networkTimeout -
tls
-
pwd
-
typeMap
-
-
Constructor Details
-
XGConnection
public XGConnection(String user, String pwd, int portNum, String url, String database, String protocolVersion, String clientVersion, boolean force, XGConnection.Tls tls, Properties properties) -
XGConnection
public XGConnection(String user, String pwd, String ip, int portNum, String url, String database, String protocolVersion, String clientVersion, String force, XGConnection.Tls tls, Properties properties) throws Exception- Throws:
Exception
-
-
Method Details
-
abort
- Specified by:
abortin interfaceConnection- Throws:
SQLException
-
addTimeout
Schedules the task to run after the specified delay- Parameters:
task- the task to runtimeout- delay in milliseconds
-
clearOneShotForce
public void clearOneShotForce() -
clearWarnings
- Specified by:
clearWarningsin interfaceConnection- Throws:
SQLException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceConnection- Throws:
SQLException
-
commit
- Specified by:
commitin interfaceConnection- Throws:
SQLException
-
connect
- Throws:
Exception
-
connected
public boolean connected() -
copy
- Throws:
SQLException
-
copy
- Throws:
SQLException
-
copy
- Throws:
SQLException
-
createArrayOf
- Specified by:
createArrayOfin interfaceConnection- Throws:
SQLException
-
createBlob
- Specified by:
createBlobin interfaceConnection- Throws:
SQLException
-
createClob
- Specified by:
createClobin interfaceConnection- Throws:
SQLException
-
createNClob
- Specified by:
createNClobin interfaceConnection- Throws:
SQLException
-
createSQLXML
- Specified by:
createSQLXMLin interfaceConnection- Throws:
SQLException
-
createStatement
- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
createStatement
- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
createStatement
- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
createStruct
- Specified by:
createStructin interfaceConnection- Throws:
SQLException
-
equals
-
forceExternal
- Throws:
Exception
-
getAutoCommit
- Specified by:
getAutoCommitin interfaceConnection- Throws:
SQLException
-
getCatalog
- Specified by:
getCatalogin interfaceConnection- Throws:
SQLException
-
getClientInfo
- Specified by:
getClientInfoin interfaceConnection- Throws:
SQLException
-
getClientInfo
- Specified by:
getClientInfoin interfaceConnection- Throws:
SQLException
-
getDB
-
getProperties
-
getHoldability
- Specified by:
getHoldabilityin interfaceConnection- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion() -
getMetaData
- Specified by:
getMetaDatain interfaceConnection- Throws:
SQLException
-
getMinorVersion
public int getMinorVersion() -
getNetworkTimeout
- Specified by:
getNetworkTimeoutin interfaceConnection- Throws:
SQLException
-
getSchema
- Specified by:
getSchemain interfaceConnection- Throws:
SQLException
-
getSchemaLocal
-
setSchemaLocal
-
getServerVersion
-
getTimeoutMillis
protected long getTimeoutMillis() -
getTransactionIsolation
- Specified by:
getTransactionIsolationin interfaceConnection- Throws:
SQLException
-
getTypeMap
- Specified by:
getTypeMapin interfaceConnection- Throws:
SQLException
-
getURL
-
getUser
-
getVersion
-
getWarnings
- Specified by:
getWarningsin interfaceConnection- Throws:
SQLException
-
hashCode
public int hashCode() -
isClosed
- Specified by:
isClosedin interfaceConnection- Throws:
SQLException
-
isReadOnly
- Specified by:
isReadOnlyin interfaceConnection- Throws:
SQLException
-
isValid
- Specified by:
isValidin interfaceConnection- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
nativeSQL
- Specified by:
nativeSQLin interfaceConnection- Throws:
SQLException
-
prepareCall
- Specified by:
prepareCallin interfaceConnection- Throws:
SQLException
-
prepareCall
- Specified by:
prepareCallin interfaceConnection- Throws:
SQLException
-
prepareCall
public CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException- Specified by:
prepareCallin interfaceConnection- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String arg0, int arg1, int arg2, int arg3) throws SQLException- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
purgeTimeoutTasks
protected void purgeTimeoutTasks()Purges all canceled tasks from the timer.Note: You should only call this if you've canceled a timer. This call may create a
Timerobject if one does not already exist -
reconnect
- Throws:
IOExceptionSQLException
-
reconnect
- Throws:
IOExceptionSQLException
-
redirect
public void redirect(String host, int port, boolean shouldRequestVersion) throws IOException, SQLException- Throws:
IOExceptionSQLException
-
releaseSavepoint
- Specified by:
releaseSavepointin interfaceConnection- Throws:
SQLException
-
rollback
- Specified by:
rollbackin interfaceConnection- Throws:
SQLException
-
rollback
- Specified by:
rollbackin interfaceConnection- Throws:
SQLException
-
sendParameterMessage
-
setAutoCommit
- Specified by:
setAutoCommitin interfaceConnection- Throws:
SQLException
-
setCatalog
- Specified by:
setCatalogin interfaceConnection- Throws:
SQLException
-
setClientInfo
- Specified by:
setClientInfoin interfaceConnection- Throws:
SQLClientInfoException
-
setClientInfo
- Specified by:
setClientInfoin interfaceConnection- Throws:
SQLClientInfoException
-
setConcurrency
-
setHoldability
- Specified by:
setHoldabilityin interfaceConnection- Throws:
SQLException
-
setMaxRows
-
setMaxRowsHardLimit
-
setMaxTempDisk
-
setMaxTime
-
setNetworkTimeout
- Specified by:
setNetworkTimeoutin interfaceConnection- Throws:
SQLException
-
setPriority
-
setPSO
- Throws:
Exception
-
setPSO
- Throws:
Exception
-
setReadOnly
- Specified by:
setReadOnlyin interfaceConnection- Throws:
SQLException
-
setSavepoint
- Specified by:
setSavepointin interfaceConnection- Throws:
SQLException
-
setSavepoint
- Specified by:
setSavepointin interfaceConnection- Throws:
SQLException
-
setSchema
- Specified by:
setSchemain interfaceConnection- Throws:
SQLException
-
setServerVersion
-
setTimeout
- Throws:
SQLException
-
setTransactionIsolation
- Specified by:
setTransactionIsolationin interfaceConnection- Throws:
SQLException
-
setTypeMap
- Specified by:
setTypeMapin interfaceConnection- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-