Interface ChangeNotificationProvider
@Internal
public interface ChangeNotificationProvider
Database-specific implementation of JDBC change notifications.
Providers are singleton beans selected by ChangeNotificationProviderResolver from a
live datasource connection during application startup. A provider translates generic
listener methods into database-specific registrations and manages
their lifecycle.
-
Method Summary
Modifier and TypeMethodDescriptionvoidregister(String dataSourceName, JdbcRepositoryOperations operations, List<ChangeListenerMethod> listenerMethods) Registers all discovered listener methods for one datasource.booleansupports(Connection connection) Determines whether this provider supports the database exposed by a connection.
-
Method Details
-
supports
Determines whether this provider supports the database exposed by a connection.- Parameters:
connection- A connection from the datasource being configured.- Returns:
truewhen this provider can register notifications on the connection.- Throws:
SQLException- If the connection cannot be inspected.
-
register
void register(String dataSourceName, JdbcRepositoryOperations operations, List<ChangeListenerMethod> listenerMethods) Registers all discovered listener methods for one datasource.- Parameters:
dataSourceName- The datasource name selected by each listener method.operations- Repository operations qualified for that datasource.listenerMethods- The listener methods collected before application startup.
-