Package com.majorana.maj_orm.DBs
Class CassandraConnector
java.lang.Object
com.majorana.maj_orm.DBs.CassandraConnector
The Cassandra Connector - Contected the Maj DB ORM to an Optional Number of Cassandra Databases
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void close() closes the cassandra sessionvoid
connect
(DBCreds creds, CassandraState state) The connect method tried the Database Credentials to connected to a Cassamdra Datanbase iff the CassandraState is enabledvoid
connectInner
(DBCreds creds, CassandraState state) public void connectInner(DBCred crefds, CassandraState state) Performs the connection and creates a cassandra session if only the cass state is enabledString getMessage()com.datastax.oss.driver.api.core.CqlSession
CqlSession getSessionvoid
setMessage
(String message) void setMessage(String message) Set the connection message, generally used intertnally only
-
Constructor Details
-
CassandraConnector
public CassandraConnector()
-
-
Method Details
-
connect
The connect method tried the Database Credentials to connected to a Cassamdra Datanbase iff the CassandraState is enabled -
getMessage
String getMessage()- Returns:
- returns the message from the last commection try
-
setMessage
void setMessage(String message) Set the connection message, generally used intertnally only -
connectInner
public void connectInner(DBCred crefds, CassandraState state) Performs the connection and creates a cassandra session if only the cass state is enabled -
getSession
public com.datastax.oss.driver.api.core.CqlSession getSession()CqlSession getSession- Returns:
- returns the cassandra CqlSession if availahle, it may be null
-
close
public void close()void close() closes the cassandra session
-