public class CassandraSessionFactoryBean extends CassandraCqlSessionFactoryBean
Session with support for executing CQL
and initializing the database schema (a.k.a. keyspace).KeyspaceMetadata,
TableMetadata| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEFAULT_CREATE_IF_NOT_EXISTS |
protected static boolean |
DEFAULT_DROP_TABLES |
protected static boolean |
DEFAULT_DROP_UNUSED_TABLES |
logger| Constructor and Description |
|---|
CassandraSessionFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
createTables(boolean drop,
boolean dropUnused,
boolean ifNotExists)
Perform schema actions.
|
protected CassandraAdminOperations |
getCassandraAdminOperations() |
CassandraConverter |
getConverter() |
protected CassandraMappingContext |
getMappingContext() |
SchemaAction |
getSchemaAction() |
protected void |
performSchemaAction()
Perform the configure
SchemaAction using CassandraMappingContext metadata. |
void |
setConverter(CassandraConverter converter)
Set the
CassandraConverter to use. |
void |
setSchemaAction(SchemaAction schemaAction)
Set the
SchemaAction. |
destroy, executeScripts, getCluster, getKeyspaceName, getObject, getObjectType, getSession, getShutdownScripts, getStartupScripts, isConnected, isSingleton, setCluster, setKeyspaceName, setShutdownScripts, setStartupScripts, translateExceptionIfPossibleprotected static final boolean DEFAULT_CREATE_IF_NOT_EXISTS
protected static final boolean DEFAULT_DROP_TABLES
protected static final boolean DEFAULT_DROP_UNUSED_TABLES
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class CassandraCqlSessionFactoryBeanExceptionprotected void performSchemaAction()
SchemaAction using CassandraMappingContext metadata.public void setConverter(CassandraConverter converter)
CassandraConverter to use. Schema actions will derive table and user type information from the
CassandraMappingContext inside converter.converter - must not be null.@Nullable public CassandraConverter getConverter()
CassandraConverter.protected CassandraMappingContext getMappingContext()
CassandraMappingContext.public void setSchemaAction(SchemaAction schemaAction)
SchemaAction.schemaAction - must not be null.public SchemaAction getSchemaAction()
SchemaAction.protected void createTables(boolean drop,
boolean dropUnused,
boolean ifNotExists)
drop - true to drop types/tables.dropUnused - true to drop unused types/tables (i.e. types/tables not know to be used by
CassandraMappingContext).ifNotExists - true to perform creations fail-safe by adding IF NOT EXISTS to each creation
statement.protected CassandraAdminOperations getCassandraAdminOperations()
CassandraAdminOperations.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.