public class CassandraAccessor extends Object implements InitializingBean
CassandraAccessor provides access to a Cassandra Session and the CassandraExceptionTranslator
.
Classes providing a higher abstraction level usually extend CassandraAccessor to provide a richer set of
functionality on top of a Session.
InitializingBean,
Session| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
CassandraAccessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Ensures the Cassandra
Session and exception translator has been propertly set. |
CassandraExceptionTranslator |
getExceptionTranslator()
Return the exception translator used by this template to translate Cassandra specific Exceptions into Spring DAO's
Exception Hierarchy.
|
com.datastax.driver.core.Session |
getSession()
Returns the Cassandra
Session used by this template to perform Cassandra data access operations. |
protected void |
logDebug(String logMessage,
Object... array) |
void |
setExceptionTranslator(CassandraExceptionTranslator exceptionTranslator)
Sets the exception translator used by this template to translate Cassandra specific Exceptions into Spring DAO's
Exception Hierarchy.
|
void |
setSession(com.datastax.driver.core.Session session)
Sets the Cassandra
Session used by this template to perform Cassandra data access operations. |
public void afterPropertiesSet()
Session and exception translator has been propertly set.afterPropertiesSet in interface InitializingBeanpublic void setExceptionTranslator(CassandraExceptionTranslator exceptionTranslator)
exceptionTranslator - exception translator to set; must not be null.CassandraExceptionTranslatorpublic CassandraExceptionTranslator getExceptionTranslator()
CassandraExceptionTranslatorpublic void setSession(com.datastax.driver.core.Session session)
Session used by this template to perform Cassandra data access operations.session - Cassandra Session used by this template. Must not benull.Sessionpublic com.datastax.driver.core.Session getSession()
Session used by this template to perform Cassandra data access operations.Session used by this template.SessionCopyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.