public interface SchemaChangeListener extends AutoCloseable
An implementation of this interface can be registered in the configuration, or with SessionBuilder.withSchemaChangeListener(SchemaChangeListener)
.
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.
If you implement this interface but don't need to implement all the methods, extend SchemaChangeListenerBase
.
close
void onKeyspaceCreated(@NonNull KeyspaceMetadata keyspace)
void onKeyspaceDropped(@NonNull KeyspaceMetadata keyspace)
void onKeyspaceUpdated(@NonNull KeyspaceMetadata current, @NonNull KeyspaceMetadata previous)
void onTableCreated(@NonNull TableMetadata table)
void onTableDropped(@NonNull TableMetadata table)
void onTableUpdated(@NonNull TableMetadata current, @NonNull TableMetadata previous)
void onUserDefinedTypeCreated(@NonNull UserDefinedType type)
void onUserDefinedTypeDropped(@NonNull UserDefinedType type)
void onUserDefinedTypeUpdated(@NonNull UserDefinedType current, @NonNull UserDefinedType previous)
void onFunctionCreated(@NonNull FunctionMetadata function)
void onFunctionDropped(@NonNull FunctionMetadata function)
void onFunctionUpdated(@NonNull FunctionMetadata current, @NonNull FunctionMetadata previous)
void onAggregateCreated(@NonNull AggregateMetadata aggregate)
void onAggregateDropped(@NonNull AggregateMetadata aggregate)
void onAggregateUpdated(@NonNull AggregateMetadata current, @NonNull AggregateMetadata previous)
void onViewCreated(@NonNull ViewMetadata view)
void onViewDropped(@NonNull ViewMetadata view)
void onViewUpdated(@NonNull ViewMetadata current, @NonNull ViewMetadata previous)
Copyright © 2017–2019. All rights reserved.