Class DefaultSessionFactory
java.lang.Object
org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory
- All Implemented Interfaces:
SessionFactory
Default
SessionFactory implementation.
This class uses a singleton CqlSession and returns the same instances.
- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
getSession()CqlSession
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSessionFactory(com.datastax.oss.driver.api.core.CqlSession session) Constructs a newDefaultSessionFactorygivenCqlSession. -
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.CqlSessionAttempts to establish aCqlSessionwith the connection infrastructure that thisSessionFactoryobject represents.
-
Constructor Details
-
DefaultSessionFactory
public DefaultSessionFactory(com.datastax.oss.driver.api.core.CqlSession session) Constructs a newDefaultSessionFactorygivenCqlSession.- Parameters:
session- theCqlSessionto be used ingetSession().
-
-
Method Details
-
getSession
public com.datastax.oss.driver.api.core.CqlSession getSession()Description copied from interface:SessionFactoryAttempts to establish aCqlSessionwith the connection infrastructure that thisSessionFactoryobject represents.- Specified by:
getSessionin interfaceSessionFactory- Returns:
- a
CqlSessionto Apache Cassandra. - See Also:
-
CqlSession
-