Config - K - the concrete class for keyspace metadata in the persistence layer.T - the concrete class for table metadata in the persistence layer.C - the concrete class for column metadata in the persistence layer.U - the concrete class for user types in the persistence layer.I - the concrete class for secondary indexes metadata in the persistence layer.V - the concrete class for materialized views metadata in the persistence layer.public abstract class AbstractCassandraPersistence<Config,K,T,C,U,I,V> extends Object implements Persistence
Persistence
layer.
Technically, this is meant to limit as much as reasonable the amount of code duplication between the persistence layers for various C* versions.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractCassandraPersistence.AbstractConnection |
Persistence.ConnectionSCHEMA_AGREEMENT_WAIT_RETRIES| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCassandraPersistence(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Iterable<K> |
currentInternalSchema()
The current schema of the concrete persistence layer.
|
void |
destroy() |
protected abstract void |
destroyPersistence()
Actually destroys the persistence layer (basically, the
destroy() implementation, but
modulo the parts that are already handled by this abstract facility) |
void |
initialize(Config config) |
protected abstract void |
initializePersistence(Config config)
Actually initialize the persistence layer (basically, the
initialize(Config) implementation,
but modulo the parts that are already handled by this abstract facility) |
String |
name() |
protected abstract AbstractCassandraSchemaConverter<K,T,C,U,I,V> |
newSchemaConverter()
Creates a new, stateless, converter for the schema of the concrete persistence layer.
|
protected abstract void |
registerInternalSchemaListener(Runnable onSchemaChange)
Register an internal schema listener that runs the provided runnable every time the internal
schema of the persistence layer changes.
|
Schema |
schema() |
String |
toString() |
protected abstract void |
unregisterInternalSchemaListener()
Unregister the internal schema listener registered through
registerInternalSchemaListener(Runnable), if necessary. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcqlSupportedOptions, decorateKeyspaceName, executeAuthResponse, getAuthenticator, isInSchemaAgreement, isSchemaAgreementAchievable, newConnection, newConnection, registerEventListener, setRpcReady, supportsSAI, supportsSecondaryIndex, unsetValue, waitForSchemaAgreementprotected AbstractCassandraPersistence(String name)
protected abstract AbstractCassandraSchemaConverter<K,T,C,U,I,V> newSchemaConverter()
protected abstract Iterable<K> currentInternalSchema()
protected abstract void registerInternalSchemaListener(Runnable onSchemaChange)
This is guaranteed to be called only once for each persistence instance, during
initialization. Implementations should usually keep track of the registered listener so they
can implement unregisterInternalSchemaListener().
protected abstract void unregisterInternalSchemaListener()
registerInternalSchemaListener(Runnable), if necessary.protected abstract void initializePersistence(Config config)
initialize(Config) implementation,
but modulo the parts that are already handled by this abstract facility)protected abstract void destroyPersistence()
destroy() implementation, but
modulo the parts that are already handled by this abstract facility)public final String name()
name in interface Persistencepublic final Schema schema()
schema in interface Persistencepublic final void initialize(Config config)
public final void destroy()
Copyright © 2021. All rights reserved.