@Configuration public abstract class AbstractCassandraConfiguration extends AbstractClusterConfiguration implements BeanClassLoaderAware
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
beanClassLoader |
Constructor and Description |
---|
AbstractCassandraConfiguration() |
Modifier and Type | Method and Description |
---|---|
CassandraConverter |
cassandraConverter()
Return the
CassandraConverter instance to convert Rows to Objects, Objects to BuiltStatements |
CassandraMappingContext |
cassandraMapping()
Return the
MappingContext instance to map Entities to properties. |
CassandraAdminOperations |
cassandraTemplate()
Creates a
CassandraAdminTemplate . |
String[] |
getEntityBasePackages()
The base packages to scan for entities annotated with
Table annotations. |
protected abstract String |
getKeyspaceName() |
SchemaAction |
getSchemaAction()
The
SchemaAction to perform. |
CassandraSessionFactoryBean |
session() |
void |
setBeanClassLoader(ClassLoader classLoader) |
cluster, getAuthProvider, getCompressionType, getContactPoints, getKeyspaceCreations, getKeyspaceDrops, getLoadBalancingPolicy, getMetricsEnabled, getPoolingOptions, getPort, getReconnectionPolicy, getRetryPolicy, getShutdownScripts, getSocketOptions, getStartupScripts
protected ClassLoader beanClassLoader
protected abstract String getKeyspaceName()
public SchemaAction getSchemaAction()
SchemaAction
to perform. Defaults to SchemaAction.NONE
.public String[] getEntityBasePackages()
Table
annotations. By default, returns the package
name of this (this.getClass().getPackage().getName()
). This method must never return null.@Bean public CassandraSessionFactoryBean session() throws Exception
Exception
@Bean public CassandraAdminOperations cassandraTemplate() throws Exception
CassandraAdminTemplate
.Exception
@Bean public CassandraMappingContext cassandraMapping() throws ClassNotFoundException
MappingContext
instance to map Entities to properties.ClassNotFoundException
@Bean public CassandraConverter cassandraConverter() throws Exception
CassandraConverter
instance to convert Rows to Objects, Objects to BuiltStatementsException
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.