public interface SchemaChangeListener
An implementation of this interface can be registered against a Cluster object through the
Cluster.register(SchemaChangeListener)
method.
Note that the methods defined by this interface will be executed by internal driver threads, and are therefore expected to have short execution times. If you need to perform long computations or blocking calls in response to schema change events, it is strongly recommended to schedule them asynchronously on a separate thread provided by your application code.
Modifier and Type | Method and Description |
---|---|
void |
onAggregateAdded(AggregateMetadata aggregate)
Called when a user-defined aggregate has been added.
|
void |
onAggregateChanged(AggregateMetadata current,
AggregateMetadata previous)
Called when a user-defined aggregate has changed.
|
void |
onAggregateRemoved(AggregateMetadata aggregate)
Called when a user-defined aggregate has been removed.
|
void |
onFunctionAdded(FunctionMetadata function)
Called when a user-defined function has been added.
|
void |
onFunctionChanged(FunctionMetadata current,
FunctionMetadata previous)
Called when a user-defined function has changed.
|
void |
onFunctionRemoved(FunctionMetadata function)
Called when a user-defined function has been removed.
|
void |
onKeyspaceAdded(KeyspaceMetadata keyspace)
Called when a keyspace has been added.
|
void |
onKeyspaceChanged(KeyspaceMetadata current,
KeyspaceMetadata previous)
Called when a keyspace has changed.
|
void |
onKeyspaceRemoved(KeyspaceMetadata keyspace)
Called when a keyspace has been removed.
|
void |
onMaterializedViewAdded(MaterializedViewMetadata view)
Called when a materialized view has been added.
|
void |
onMaterializedViewChanged(MaterializedViewMetadata current,
MaterializedViewMetadata previous)
Called when a materialized view has changed.
|
void |
onMaterializedViewRemoved(MaterializedViewMetadata view)
Called when a materialized view has been removed.
|
void |
onRegister(Cluster cluster)
Gets invoked when the listener is registered with a cluster.
|
void |
onTableAdded(TableMetadata table)
Called when a table has been added.
|
void |
onTableChanged(TableMetadata current,
TableMetadata previous)
Called when a table has changed.
|
void |
onTableRemoved(TableMetadata table)
Called when a table has been removed.
|
void |
onUnregister(Cluster cluster)
Gets invoked when the listener is unregistered from a cluster, or at cluster shutdown if the
tracker was not unregistered.
|
void |
onUserTypeAdded(UserType type)
Called when a user-defined type has been added.
|
void |
onUserTypeChanged(UserType current,
UserType previous)
Called when a user-defined type has changed.
|
void |
onUserTypeRemoved(UserType type)
Called when a user-defined type has been removed.
|
void onKeyspaceAdded(KeyspaceMetadata keyspace)
keyspace
- the keyspace that has been added.void onKeyspaceRemoved(KeyspaceMetadata keyspace)
keyspace
- the keyspace that has been removed.void onKeyspaceChanged(KeyspaceMetadata current, KeyspaceMetadata previous)
current
- the keyspace that has changed, in its current form (after the change).previous
- the keyspace that has changed, in its previous form (before the change).void onTableAdded(TableMetadata table)
table
- the table that has been newly added.void onTableRemoved(TableMetadata table)
table
- the table that has been removed.void onTableChanged(TableMetadata current, TableMetadata previous)
current
- the table that has changed, in its current form (after the change).previous
- the table that has changed, in its previous form (before the change).void onUserTypeAdded(UserType type)
type
- the type that has been newly added.void onUserTypeRemoved(UserType type)
type
- the type that has been removed.void onUserTypeChanged(UserType current, UserType previous)
current
- the type that has changed, in its current form (after the change).previous
- the type that has changed, in its previous form (before the change).void onFunctionAdded(FunctionMetadata function)
function
- the function that has been newly added.void onFunctionRemoved(FunctionMetadata function)
function
- the function that has been removed.void onFunctionChanged(FunctionMetadata current, FunctionMetadata previous)
current
- the function that has changed, in its current form (after the change).previous
- the function that has changed, in its previous form (before the change).void onAggregateAdded(AggregateMetadata aggregate)
aggregate
- the aggregate that has been newly added.void onAggregateRemoved(AggregateMetadata aggregate)
aggregate
- the aggregate that has been removed.void onAggregateChanged(AggregateMetadata current, AggregateMetadata previous)
current
- the aggregate that has changed, in its current form (after the change).previous
- the aggregate that has changed, in its previous form (before the change).void onMaterializedViewAdded(MaterializedViewMetadata view)
view
- the materialized view that has been newly added.void onMaterializedViewRemoved(MaterializedViewMetadata view)
view
- the materialized view that has been removed.void onMaterializedViewChanged(MaterializedViewMetadata current, MaterializedViewMetadata previous)
current
- the materialized view that has changed, in its current form (after the change).previous
- the materialized view that has changed, in its previous form (before the
change).void onRegister(Cluster cluster)
cluster
- the cluster that this tracker is registered with.void onUnregister(Cluster cluster)
cluster
- the cluster that this tracker was registered with.Copyright © 2012–2024. All rights reserved.