@java.lang.SuppressWarnings({"unchecked", "rawtypes"}) public class CassandraDatastore extends AbstractDatastore
A Datastore implementation for Cassandra. Uses Spring Data Cassandra Factory beans to create and initialise the Cassandra driver cluster and session
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
CONTACT_POINTS |
|
static java.lang.String |
DEFAULT_KEYSPACE |
|
static java.lang.String |
DEFAULT_MAPPING |
|
static org.springframework.data.cassandra.config.SchemaAction |
DEFAULT_SCHEMA_ACTION |
|
static java.lang.String |
KEYSPACE_ACTION |
|
static java.lang.String |
KEYSPACE_CONFIG |
|
static java.lang.String |
KEYSPACE_DURABLE_WRITES |
|
static java.lang.String |
KEYSPACE_NAME |
|
static java.lang.String |
KEYSPACE_NETWORK_TOPOLOGY |
|
static java.lang.String |
KEYSPACE_REPLICATION_FACTOR |
|
static java.lang.String |
KEYSPACE_REPLICATION_STRATEGY |
|
static java.lang.String |
PORT |
|
static java.lang.String |
SCHEMA_ACTION |
|
static java.lang.String |
WRITE_OPTIONS |
|
protected org.springframework.data.cassandra.core.CassandraAdminTemplate |
cassandraAdminTemplate |
|
protected org.springframework.cassandra.config.CassandraCqlClusterFactoryBean |
cassandraCqlClusterFactoryBean |
|
protected GormCassandraSessionFactoryBean |
cassandraSessionFactoryBean |
|
protected org.springframework.data.cassandra.core.CassandraTemplate |
cassandraTemplate |
|
protected boolean |
developmentMode |
|
protected CassandraGormEnhancer |
gormEnhancer |
|
protected java.lang.String |
keyspace |
|
protected org.springframework.cassandra.config.KeyspaceActionSpecificationFactoryBean |
keyspaceActionSpecificationFactoryBean |
|
protected com.datastax.driver.core.Cluster |
nativeCluster |
|
protected com.datastax.driver.core.Session |
nativeSession |
|
protected BasicCassandraMappingContext |
springCassandraMappingContext |
|
protected boolean |
stateless |
|
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
Fields inherited from class | Fields |
---|---|
class AbstractDatastore |
LOG, cacheAdapterRepository, connectionDetails, mappingContext, serviceRegistry |
Constructor and description |
---|
CassandraDatastore
() |
CassandraDatastore
(java.util.Map<java.lang.String, java.lang.Object> connectionDetails, org.springframework.context.ConfigurableApplicationContext ctx) |
CassandraDatastore
(CassandraMappingContext mappingContext, org.springframework.core.env.PropertyResolver connectionDetails, org.springframework.context.ConfigurableApplicationContext ctx) |
CassandraDatastore
(CassandraMappingContext mappingContext, java.util.Map<java.lang.String, java.lang.Object> connectionDetails, org.springframework.context.ConfigurableApplicationContext ctx) |
CassandraDatastore
(CassandraMappingContext mappingContext, org.springframework.core.env.PropertyResolver connectionDetails, com.datastax.driver.core.Cluster existingCluster, org.springframework.context.ConfigurableApplicationContext ctx) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
afterPropertiesSet() |
|
protected void |
buildIndex() |
|
protected org.springframework.data.cassandra.mapping.CassandraMappingContext |
cassandraMapping() |
|
void |
close() |
|
protected com.datastax.driver.core.Cluster |
createCluster() |
|
protected java.util.Set<org.springframework.cassandra.core.keyspace.KeyspaceActionSpecification<?>> |
createKeyspaceSpecifications() |
|
protected com.datastax.driver.core.Session |
createNativeSession() |
|
protected Session |
createSession(org.springframework.core.env.PropertyResolver connectionDetails) |
|
protected Session |
createStatelessSession(org.springframework.core.env.PropertyResolver connectionDetails) |
|
void |
destroy() |
|
void |
enhanceAll() |
|
org.springframework.data.cassandra.core.CassandraTemplate |
getCassandraTemplate() |
|
com.datastax.driver.core.Cluster |
getNativeCluster() |
|
com.datastax.driver.core.Session |
getNativeSession() |
|
org.springframework.transaction.PlatformTransactionManager |
getTransactionManager() |
|
protected void |
initializeConverters(MappingContext mappingContext) |
|
void |
persistentEntityAdded(PersistentEntity entity) |
|
protected void |
registerEventListeners(ConfigurableApplicationEventPublisher eventPublisher) |
|
void |
setCassandraCqlClusterFactoryBean(org.springframework.cassandra.config.CassandraCqlClusterFactoryBean cassandraCqlClusterFactoryBean) |
|
void |
setCassandraSessionFactoryBean(GormCassandraSessionFactoryBean cassandraSessionFactoryBean) |
|
void |
setDevelopmentMode(boolean developmentMode) Sets to development mode which enables automatic creation of keyspace and schema |
|
void |
setKeyspaceActionSpecificationFactoryBean(org.springframework.cassandra.config.KeyspaceActionSpecificationFactoryBean keyspaceActionSpecificationFactoryBean) |
Methods inherited from class | Name |
---|---|
class AbstractDatastore |
connect, connect, connectStateless, createSession, createStatelessSession, destroy, getApplicationContext, getApplicationEventPublisher, getCurrentSession, getMappingContext, getService, getServices, hasCurrentSession, initializeConverters, isIndexed, isSchemaless, mapToPropertyResolver, retrieveSession, retrieveSession, setApplicationContext, withSession |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Sets to development mode which enables automatic creation of keyspace and schema
developmentMode
- True if development mode is enabled