public interface DatabaseChangeRegistration extends NotificationRegistration
oracle.jdbc.OracleStatement.setDatabaseChangeRegistration(oracle.jdbc.dcn.DatabaseChangeRegistration)NotificationRegistration.RegistrationState| Modifier and Type | Method and Description |
|---|---|
void |
addListener(DatabaseChangeListener listener)
Register a listener with this registration.
|
void |
addListener(DatabaseChangeListener listener, Executor e)
Register a listener with this registration.
|
long |
getRegId()
Returns the registration id provided by the database.
|
int |
getRegistrationId()
Deprecated.
This method is deprecated in 11.2. Use
getRegId() instead. |
String[] |
getTables()
Returns the name of the tables associated with this registration.
|
void |
removeListener(DatabaseChangeListener listener)
Remove a listener from the list of registered listeners.
|
getDatabaseName, getRegistrationException, getRegistrationOptions, getState, getUserNameint getRegistrationId()
getRegId() instead.long getRegId()
String[] getTables()
void addListener(DatabaseChangeListener listener) throws SQLException
Note that the listener's code will be executed in the thread owned by the driver.
SQLExceptionvoid addListener(DatabaseChangeListener listener, Executor e) throws SQLException
This method lets you control which thread will execute the listener's code when an event occurs by specifying an executor. You can provide your own executor which can for example use a pool of threads.
SQLExceptionvoid removeListener(DatabaseChangeListener listener) throws SQLException
SQLException