public class CassandraTemplateFactoryBean extends Object implements FactoryBean<CassandraTemplate>, InitializingBean
CassandraTemplate
.Modifier and Type | Field and Description |
---|---|
protected CassandraConverter |
converter |
protected com.datastax.driver.core.Session |
session |
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 |
setSession(com.datastax.driver.core.Session session)
Sets the Cassandra
Session to use. |
protected com.datastax.driver.core.Session session
protected CassandraConverter converter
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public CassandraTemplate getObject() throws Exception
getObject
in interface FactoryBean<CassandraTemplate>
Exception
public 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 multiple Session
and
CassandraTemplate
beans.session
- must not be null.public void setConverter(CassandraConverter converter)
CassandraConverter
to use.converter
- must not be null.Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.