public class SessionFactoryInitializer extends Object implements InitializingBean, DisposableBean
KeyspacePopulator| Constructor and Description |
|---|
SessionFactoryInitializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Use the keyspace populator to set up the keyspace.
|
void |
destroy()
Use the keyspace cleaner to clean up the keyspace.
|
void |
setEnabled(boolean enabled)
Flag to explicitly enable or disable the keyspace populator and
keyspace cleaner.
|
void |
setKeyspaceCleaner(KeyspacePopulator keyspaceCleaner)
Set the
KeyspacePopulator to execute during the bean destruction phase, cleaning up the keyspace and
leaving it in a known state for others. |
void |
setKeyspacePopulator(KeyspacePopulator keyspacePopulator)
Set the
KeyspacePopulator to execute during the bean initialization phase. |
void |
setSessionFactory(SessionFactory sessionFactory)
The
SessionFactory for the keyspace to populate when this component is initialized and to clean up when
this component is shut down. |
public void setSessionFactory(SessionFactory sessionFactory)
SessionFactory for the keyspace to populate when this component is initialized and to clean up when
this component is shut down.
This property is mandatory with no default provided.
sessionFactory - the SessionFactory.public void setKeyspacePopulator(KeyspacePopulator keyspacePopulator)
KeyspacePopulator to execute during the bean initialization phase.keyspacePopulator - the KeyspacePopulator to use during initialization.setKeyspaceCleaner(org.springframework.data.cassandra.core.cql.session.init.KeyspacePopulator)public void setKeyspaceCleaner(KeyspacePopulator keyspaceCleaner)
KeyspacePopulator to execute during the bean destruction phase, cleaning up the keyspace and
leaving it in a known state for others.keyspaceCleaner - the KeyspacePopulator to use during destruction.setKeyspacePopulator(org.springframework.data.cassandra.core.cql.session.init.KeyspacePopulator)public void setEnabled(boolean enabled)
enabled - true if the keyspace populator and keyspace cleaner should be called on startup and
shutdown, respectively.public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic void destroy()
destroy in interface DisposableBeanCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.