Package org.gcube.portal.databook.server
Class CassandraClusterConnection
- java.lang.Object
-
- org.gcube.portal.databook.server.CassandraClusterConnection
-
public class CassandraClusterConnection extends Object
- Author:
- Massimiliano Assante ISTI-CNR, Costantino Perciante ISTI-CNR
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCassandraClusterConnection(boolean dropSchema)protectedCassandraClusterConnection(boolean dropSchema, String infrastructureName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseConnection()Close the connection poolcom.netflix.astyanax.KeyspacegetKeyspace()Get the reference to the current keyspacevoidSetUpKeySpaces(com.netflix.astyanax.AstyanaxContext<com.netflix.astyanax.Cluster> clusterContext, boolean dropSchema)
-
-
-
Constructor Detail
-
CassandraClusterConnection
protected CassandraClusterConnection(boolean dropSchema)
- Parameters:
dropSchema- set true if you want do drop the current and set up new one the connection to cassandra cluster
-
CassandraClusterConnection
protected CassandraClusterConnection(boolean dropSchema, String infrastructureName)- Parameters:
dropSchema- set true if you want do drop the current and set up new one the connection to cassandra cluster
-
-
Method Detail
-
closeConnection
public void closeConnection()
Close the connection pool
-
getKeyspace
public com.netflix.astyanax.Keyspace getKeyspace()
Get the reference to the current keyspace- Returns:
- keyspace reference
-
SetUpKeySpaces
public void SetUpKeySpaces(com.netflix.astyanax.AstyanaxContext<com.netflix.astyanax.Cluster> clusterContext, boolean dropSchema)- Parameters:
clusterContext-dropSchema-- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
-
-