/** * Sets the Cassandra {@link Session} used by this template to perform Cassandra data access operations. The * {@code session} will replace the current {@link #getSessionFactory()} with {@link DefaultSessionFactory}. * * @param session Cassandra {@link Session} used by this template, must not be{@literal null}. * @see com.datastax.driver.core.Session * @see DefaultSessionFactory */ public void setSession(Session session) { Assert.notNull(session, "Session must not be null"); setSessionFactory(new DefaultSessionFactory(session)); }