public class CassandraConnection extends Object implements Connection
Connection.| Modifier and Type | Field and Description |
|---|---|
String |
cluster |
protected String |
currentKeyspace |
static int |
DB_MAJOR_VERSION |
static int |
DB_MINOR_VERSION |
static String |
DB_PRODUCT_NAME |
static int |
DB_REVISION |
boolean |
debugMode |
static String |
DEFAULT_CQL_VERSION |
static com.datastax.driver.core.ProtocolOptions.Compression |
defaultCompression |
com.datastax.driver.core.ConsistencyLevel |
defaultConsistencyLevel |
protected TreeSet<String> |
hostListBackup |
protected TreeSet<String> |
hostListPrimary |
protected static String |
NOT_SUPPORTED |
protected int |
numFailures |
ConcurrentMap<String,com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement> |
preparedStatements |
static Integer |
roundRobinIndex |
protected long |
timeOfLastFailure |
protected String |
url |
protected String |
username |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
CassandraConnection(com.github.adejanovski.cassandra.jdbc.SessionHolder sessionHolder)
Instantiates a new CassandraConnection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Executor executor) |
void |
clearWarnings() |
void |
close()
On close of connection.
|
void |
commit() |
Array |
createArrayOf(String arg0,
Object[] arg1) |
Blob |
createBlob() |
Clob |
createClob() |
NClob |
createNClob() |
SQLXML |
createSQLXML() |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
Struct |
createStruct(String arg0,
Object[] arg1) |
boolean |
getAutoCommit() |
String |
getCatalog() |
Properties |
getClientInfo() |
String |
getClientInfo(String label) |
com.datastax.driver.core.Metadata |
getClusterMetadata() |
Properties |
getConnectionProps() |
int |
getHoldability() |
DatabaseMetaData |
getMetaData() |
int |
getNetworkTimeout() |
String |
getSchema() |
com.datastax.driver.core.Session |
getSession() |
int |
getTransactionIsolation() |
Map<String,Class<?>> |
getTypeMap() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isReadOnly() |
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(Class<?> arg0) |
String |
nativeSQL(String sql) |
CallableStatement |
prepareCall(String arg0) |
CallableStatement |
prepareCall(String arg0,
int arg1,
int arg2) |
CallableStatement |
prepareCall(String arg0,
int arg1,
int arg2,
int arg3) |
com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement |
prepareStatement(String cql) |
com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement |
prepareStatement(String cql,
int rsType) |
PreparedStatement |
prepareStatement(String arg0,
int[] arg1) |
com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement |
prepareStatement(String cql,
int rsType,
int rsConcurrency) |
com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement |
prepareStatement(String cql,
int rsType,
int rsConcurrency,
int rsHoldability) |
PreparedStatement |
prepareStatement(String arg0,
String[] arg1) |
void |
releaseSavepoint(Savepoint arg0) |
protected boolean |
removeStatement(Statement statement)
Remove a Statement from the Open Statements List
|
void |
rollback() |
void |
rollback(Savepoint arg0) |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(String arg0) |
void |
setClientInfo(Properties props) |
void |
setClientInfo(String key,
String value) |
void |
setHoldability(int arg0) |
void |
setNetworkTimeout(Executor executor,
int milliseconds) |
void |
setReadOnly(boolean arg0) |
Savepoint |
setSavepoint() |
Savepoint |
setSavepoint(String arg0) |
void |
setSchema(String schema) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(Map<String,Class<?>> arg0) |
String |
toString() |
<T> T |
unwrap(Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitabort, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getNetworkTimeout, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, releaseSavepoint, rollback, setNetworkTimeout, setSavepoint, setSavepoint, setTypeMappublic static Integer roundRobinIndex
public static volatile int DB_MAJOR_VERSION
public static volatile int DB_MINOR_VERSION
public static volatile int DB_REVISION
public static final String DB_PRODUCT_NAME
public static final String DEFAULT_CQL_VERSION
public ConcurrentMap<String,com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement> preparedStatements
public static com.datastax.driver.core.ProtocolOptions.Compression defaultCompression
protected long timeOfLastFailure
protected int numFailures
protected String username
protected String url
public String cluster
protected String currentKeyspace
public boolean debugMode
public com.datastax.driver.core.ConsistencyLevel defaultConsistencyLevel
protected static final String NOT_SUPPORTED
public CassandraConnection(com.github.adejanovski.cassandra.jdbc.SessionHolder sessionHolder)
throws SQLException
sessionHolder - SQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface ConnectionSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface ConnectionSQLExceptionpublic void commit()
throws SQLException
commit in interface ConnectionSQLExceptionpublic Statement createStatement() throws SQLException
createStatement in interface ConnectionSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic boolean getAutoCommit()
throws SQLException
getAutoCommit in interface ConnectionSQLExceptionpublic Properties getConnectionProps()
public String getCatalog() throws SQLException
getCatalog in interface ConnectionSQLExceptionpublic void setSchema(String schema) throws SQLException
setSchema in interface ConnectionSQLExceptionpublic String getSchema() throws SQLException
getSchema in interface ConnectionSQLExceptionpublic Properties getClientInfo() throws SQLException
getClientInfo in interface ConnectionSQLExceptionpublic String getClientInfo(String label) throws SQLException
getClientInfo in interface ConnectionSQLExceptionpublic int getHoldability()
throws SQLException
getHoldability in interface ConnectionSQLExceptionpublic DatabaseMetaData getMetaData() throws SQLException
getMetaData in interface ConnectionSQLExceptionpublic int getTransactionIsolation()
throws SQLException
getTransactionIsolation in interface ConnectionSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface ConnectionSQLExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface ConnectionSQLExceptionpublic boolean isReadOnly()
throws SQLException
isReadOnly in interface ConnectionSQLExceptionpublic boolean isValid(int timeout)
throws SQLTimeoutException
isValid in interface ConnectionSQLTimeoutExceptionpublic boolean isWrapperFor(Class<?> arg0) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic String nativeSQL(String sql) throws SQLException
nativeSQL in interface ConnectionSQLExceptionpublic com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement prepareStatement(String cql) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement prepareStatement(String cql, int rsType) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement prepareStatement(String cql, int rsType, int rsConcurrency) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic com.github.adejanovski.cassandra.jdbc.CassandraPreparedStatement prepareStatement(String cql, int rsType, int rsConcurrency, int rsHoldability) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic void rollback()
throws SQLException
rollback in interface ConnectionSQLExceptionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionSQLExceptionpublic void setCatalog(String arg0) throws SQLException
setCatalog in interface ConnectionSQLExceptionpublic void setClientInfo(Properties props) throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoExceptionpublic void setClientInfo(String key, String value) throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoExceptionpublic void setHoldability(int arg0)
throws SQLException
setHoldability in interface ConnectionSQLExceptionpublic void setReadOnly(boolean arg0)
throws SQLException
setReadOnly in interface ConnectionSQLExceptionpublic void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface ConnectionSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionprotected boolean removeStatement(Statement statement)
statement - public com.datastax.driver.core.Session getSession()
public com.datastax.driver.core.Metadata getClusterMetadata()
public Map<String,Class<?>> getTypeMap() throws SQLException
getTypeMap in interface ConnectionSQLExceptionpublic Array createArrayOf(String arg0, Object[] arg1) throws SQLException
SQLExceptionpublic Blob createBlob() throws SQLException
SQLExceptionpublic Clob createClob() throws SQLException
SQLExceptionpublic NClob createNClob() throws SQLException
SQLExceptionpublic SQLXML createSQLXML() throws SQLException
SQLExceptionpublic Struct createStruct(String arg0, Object[] arg1) throws SQLException
SQLExceptionpublic CallableStatement prepareCall(String arg0) throws SQLException
SQLExceptionpublic CallableStatement prepareCall(String arg0, int arg1, int arg2) throws SQLException
SQLExceptionpublic CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String arg0, int[] arg1) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String arg0, String[] arg1) throws SQLException
SQLExceptionpublic void releaseSavepoint(Savepoint arg0) throws SQLException
SQLExceptionpublic void rollback(Savepoint arg0) throws SQLException
SQLExceptionpublic Savepoint setSavepoint() throws SQLException
SQLExceptionpublic Savepoint setSavepoint(String arg0) throws SQLException
SQLExceptionpublic void setTypeMap(Map<String,Class<?>> arg0) throws SQLException
SQLExceptionpublic void abort(Executor executor) throws SQLException
SQLExceptionpublic void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
SQLExceptionpublic int getNetworkTimeout()
throws SQLException
SQLExceptionCopyright © 2015–2016. All rights reserved.