public class CassandraTemplateFactoryBean extends Object implements FactoryBean<CassandraTemplate>, InitializingBean
CassandraTemplate.| Modifier and Type | Field and Description |
|---|---|
protected CassandraConverter |
converter |
protected CqlOperations |
cqlOperations |
protected SessionFactory |
sessionFactory |
| Constructor and Description |
|---|
CassandraTemplateFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
CassandraTemplate |
getObject() |
Class<CassandraTemplate> |
getObjectType() |
boolean |
isSingleton() |
void |
setConverter(CassandraConverter converter)
Set the
CassandraConverter to use. |
void |
setCqlOperations(CqlOperations cqlOperations)
Sets the Cassandra
CqlOperations to use. |
void |
setSession(com.datastax.driver.core.Session session)
Sets the Cassandra
Session to use. |
void |
setSessionFactory(SessionFactory sessionFactory)
Sets the Cassandra
SessionFactory to use. |
@Nullable protected SessionFactory sessionFactory
@Nullable protected CqlOperations cqlOperations
@Nullable protected CassandraConverter converter
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic CassandraTemplate getObject() throws Exception
getObject in interface FactoryBean<CassandraTemplate>Exceptionpublic Class<CassandraTemplate> getObjectType()
getObjectType in interface FactoryBean<CassandraTemplate>public boolean isSingleton()
isSingleton in interface FactoryBean<CassandraTemplate>public void setSession(com.datastax.driver.core.Session session)
Session to use. The CassandraTemplate will use the logged keyspace of the
underlying Session. Don't change the keyspace using CQL but use a SessionFactory.session - must not be null.public void setSessionFactory(SessionFactory sessionFactory)
SessionFactory to use. The CassandraTemplate will use the logged keyspace of the
underlying Session. Don't change the keyspace using CQL.sessionFactory - must not be null.public void setCqlOperations(CqlOperations cqlOperations)
CqlOperations to use. The CassandraTemplate will use the logged keyspace of the
underlying Session. Don't change the keyspace using CQL but use setSessionFactory(SessionFactory).cqlOperations - must not be null.public void setConverter(CassandraConverter converter)
CassandraConverter to use.converter - must not be null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.