Class DefaultSessionFactory

java.lang.Object
org.springframework.data.cassandra.core.cql.session.DefaultSessionFactory
All Implemented Interfaces:
SessionFactory

public class DefaultSessionFactory extends Object implements SessionFactory
Default SessionFactory implementation.

This class uses a singleton CqlSession and returns the same instances.

Since:
2.0
Author:
Mark Paluch
See Also:
  • Constructor Details

    • DefaultSessionFactory

      public DefaultSessionFactory(com.datastax.oss.driver.api.core.CqlSession session)
      Constructs a new DefaultSessionFactory given CqlSession.
      Parameters:
      session - the CqlSession to be used in getSession().
  • Method Details

    • getSession

      public com.datastax.oss.driver.api.core.CqlSession getSession()
      Description copied from interface: SessionFactory
      Attempts to establish a CqlSession with the connection infrastructure that this SessionFactory object represents.
      Specified by:
      getSession in interface SessionFactory
      Returns:
      a CqlSession to Apache Cassandra.
      See Also:
      • CqlSession