public abstract class NotificationListener
extends com.google.common.util.concurrent.AbstractExecutionThreadService
| Constructor and Description |
|---|
NotificationListener() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
closeConnection(Connection connection)
Close database connection and make sure it is not reused by anyone else
(e.g.
|
String[] |
getChannels() |
protected abstract Connection |
getConnection()
Obtain a new database connection.
|
long |
getFetchIntervalMillis() |
long |
getRetryDelayMillis() |
protected abstract void |
receiveNotification(org.postgresql.PGNotification notification)
Process incoming notification.
|
protected void |
run() |
void |
setChannels(String[] channels) |
void |
setFetchIntervalMillis(long fetchIntervalMillis) |
void |
setRetryDelayMillis(long retryDelayMillis) |
public String[] getChannels()
public void setChannels(String[] channels)
public long getRetryDelayMillis()
public void setRetryDelayMillis(long retryDelayMillis)
public long getFetchIntervalMillis()
public void setFetchIntervalMillis(long fetchIntervalMillis)
protected abstract Connection getConnection() throws SQLException
SQLException - when database connection failedprotected abstract void closeConnection(Connection connection) throws SQLException
connection - database connectionSQLException - when error occurredprotected abstract void receiveNotification(org.postgresql.PGNotification notification)
notification - notificationCopyright © 2019. All rights reserved.