- All Known Implementing Classes:
AbstractRoutingSessionFactory
,DefaultSessionFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A factory for Apache Cassandra
sessions
.
A SessionFactory
object is the preferred means of getting a connection. The SessionFactory
interface
is implemented by a CqlSession
provider.
A SessionFactory
object can have properties that can be modified when necessary. For example, if the
CqlSession
is moved to a different server, the property for the server can be changed. The benefit is that
because the data source's properties can be changed, any code accessing that SessionFactory
does not need to
be changed.- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
CqlSession
Session
-
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.CqlSession
Attempts to establish aCqlSession
with the connection infrastructure that thisSessionFactory
object represents.
-
Method Details
-
getSession
com.datastax.oss.driver.api.core.CqlSession getSession()Attempts to establish aCqlSession
with the connection infrastructure that thisSessionFactory
object represents.- Returns:
- a
CqlSession
to Apache Cassandra. - See Also:
-
CqlSession
-