@Configuration public abstract class AbstractSessionConfiguration extends AbstractClusterConfiguration
@Configuration class used to configure a Cassandra client application
Session connected to a Cassandra Cluster. Enables a
Cassandra Keyspace to be specified along with the ability to execute arbitrary CQL on startup as well as shutdown.AbstractClusterConfiguration,
Configuration| Constructor and Description |
|---|
AbstractSessionConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getKeyspaceName()
Return the name of the keyspace to connect to.
|
CassandraCqlSessionFactoryBean |
session()
Creates a
CassandraCqlSessionFactoryBean that provides a Cassandra
Session. |
SessionFactory |
sessionFactory()
|
cluster, getAddressTranslator, getAuthProvider, getClusterBuilderConfigurer, getClusterName, getCompressionType, getContactPoints, getKeyspaceCreations, getKeyspaceDrops, getLoadBalancingPolicy, getMaxSchemaAgreementWaitSeconds, getMetricsEnabled, getNettyOptions, getPoolingOptions, getPort, getProtocolVersion, getQueryOptions, getReconnectionPolicy, getRetryPolicy, getShutdownScripts, getSocketOptions, getSpeculativeExecutionPolicy, getStartupScripts, getTimestampGenerator@Bean public CassandraCqlSessionFactoryBean session()
CassandraCqlSessionFactoryBean that provides a Cassandra
Session.CassandraCqlSessionFactoryBean.AbstractClusterConfiguration.cluster(),
getKeyspaceName()@Bean public SessionFactory sessionFactory()
SessionFactory used to initialize the Template API.protected abstract String getKeyspaceName()
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.