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 newDefaultSessionFactory
givenCqlSession
. -
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.CqlSession
Attempts to establish aCqlSession
with the connection infrastructure that thisSessionFactory
object represents.
-
Constructor Details
-
DefaultSessionFactory
public DefaultSessionFactory(com.datastax.oss.driver.api.core.CqlSession session) Constructs a newDefaultSessionFactory
givenCqlSession
.- Parameters:
session
- theCqlSession
to be used ingetSession()
.
-
-
Method Details
-
getSession
public com.datastax.oss.driver.api.core.CqlSession getSession()Description copied from interface:SessionFactory
Attempts to establish aCqlSession
with the connection infrastructure that thisSessionFactory
object represents.- Specified by:
getSession
in interfaceSessionFactory
- Returns:
- a
CqlSession
to Apache Cassandra. - See Also:
-
CqlSession
-