Package org.teiid.cassandra
Class BaseCassandraConnection
- java.lang.Object
-
- org.teiid.cassandra.BaseCassandraConnection
-
- All Implemented Interfaces:
Connection
,CassandraConnection
- Direct Known Subclasses:
CassandraConnectionImpl
public class BaseCassandraConnection extends Object implements CassandraConnection
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseCassandraConnection(CassandraConfiguration config, com.datastax.driver.core.Metadata metadata)
BaseCassandraConnection(CassandraConnectionFactory connectionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
com.datastax.driver.core.ResultSetFuture
executeBatch(String update, List<Object[]> values)
Execute a bulk updatecom.datastax.driver.core.ResultSetFuture
executeBatch(List<String> updates)
Execute a batch of updatescom.datastax.driver.core.ResultSetFuture
executeQuery(String query)
Executes a CQL query.com.datastax.driver.core.VersionNumber
getVersion()
Get the version in use for this connectioncom.datastax.driver.core.KeyspaceMetadata
keyspaceInfo()
Returns metadata about Cassandra keyspace (column families, columns metadata etc.)
-
-
-
Constructor Detail
-
BaseCassandraConnection
public BaseCassandraConnection(CassandraConnectionFactory connectionFactory)
-
BaseCassandraConnection
protected BaseCassandraConnection(CassandraConfiguration config, com.datastax.driver.core.Metadata metadata)
-
-
Method Detail
-
executeQuery
public com.datastax.driver.core.ResultSetFuture executeQuery(String query)
Description copied from interface:CassandraConnection
Executes a CQL query.- Specified by:
executeQuery
in interfaceCassandraConnection
-
keyspaceInfo
public com.datastax.driver.core.KeyspaceMetadata keyspaceInfo() throws TranslatorException
Description copied from interface:CassandraConnection
Returns metadata about Cassandra keyspace (column families, columns metadata etc.)- Specified by:
keyspaceInfo
in interfaceCassandraConnection
- Throws:
TranslatorException
-
executeBatch
public com.datastax.driver.core.ResultSetFuture executeBatch(List<String> updates)
Description copied from interface:CassandraConnection
Execute a batch of updates- Specified by:
executeBatch
in interfaceCassandraConnection
- Returns:
-
executeBatch
public com.datastax.driver.core.ResultSetFuture executeBatch(String update, List<Object[]> values)
Description copied from interface:CassandraConnection
Execute a bulk update- Specified by:
executeBatch
in interfaceCassandraConnection
- Returns:
-
getVersion
public com.datastax.driver.core.VersionNumber getVersion()
Description copied from interface:CassandraConnection
Get the version in use for this connection- Specified by:
getVersion
in interfaceCassandraConnection
- Returns:
-
close
public void close()
- Specified by:
close
in interfaceConnection
-
-