org.jboss.shotoku.cache.service.monitor
Interface RenewableCacheMonitorServiceMBean
- All Known Implementing Classes:
- DummyRenewableCacheMonitorService
public interface RenewableCacheMonitorServiceMBean
- Author:
- Adam Warski
getRenewableCacheService
RenewableCacheServiceMBean getRenewableCacheService()
setRenewableCacheService
void setRenewableCacheService(RenewableCacheServiceMBean renewableCacheService)
getInterval
long getInterval()
- Returns:
- Interval at which cache items will be checked, if there are no errors.
setInterval
void setInterval(long interval)
- Parameters:
interval - Interval at which cache items will be checked, if there are no errors.
getMaximumNumberOfAlerts
int getMaximumNumberOfAlerts()
- Returns:
- Maximum number of alerts stored. After this number is exceeded, no new alerts
are recorded.
setMaximumNumberOfAlerts
void setMaximumNumberOfAlerts(int maximumNumberOfAlerts)
- Parameters:
maximumNumberOfAlerts - Maximum number of alerts stored. After this number is exceeded, no new alerts
are recorded.
getUpdateAlertIntervalMultiplier
int getUpdateAlertIntervalMultiplier()
- Returns:
- How many times the interval of a cache item must be exceeded, before an
"key not updated" or "key too long in update" alert is issued.
setUpdateAlertIntervalMultiplier
void setUpdateAlertIntervalMultiplier(int updateAlertIntervalMultiplier)
- Parameters:
updateAlertIntervalMultiplier - How many times the interval of a cache item must be exceeded, before an
"key not updated" or "key too long in update" alert is issued.
update
void update()
start
void start()
stop
void stop()
getAlertsForCacheItem
java.util.List<CacheAlert> getAlertsForCacheItem(CacheItemOperations<?,?> rcid)
- Parameters:
rcid - CacheItem} for which to get alerts.
- Returns:
- A list of alerts for the given
CacheItem, sorted from the
newest alert, or null is there are no alerts for the given cache item.
clearAlerts
void clearAlerts()
- Clears all alerts.
getCacheItemsWithAlerts
java.util.Set<CacheItemOperations<?,?>> getCacheItemsWithAlerts()
- Returns:
- A set of
CacheItemOperations, for which there are any alerts.
getSmtpServer
java.lang.String getSmtpServer()
- Returns:
- Smtp server to use, when sending alert e-mails.
setSmtpServer
void setSmtpServer(java.lang.String smtpServer)
- Parameters:
smtpServer - Smtp server to use, when sending alert e-mails.
getSmtpUser
java.lang.String getSmtpUser()
- Returns:
- Smtp user to use, when sending alert e-mails. If the server does not require
authentication, an empty string or null.
setSmtpUser
void setSmtpUser(java.lang.String smtpUser)
- Parameters:
smtpUser - Smtp user to use, when sending alert e-mails. If the server does not require
authentication, an empty string or null.
getSmtpPassword
java.lang.String getSmtpPassword()
- Returns:
- Smtp password to use, when sending alert e-mails.
setSmtpPassword
void setSmtpPassword(java.lang.String smtpPassword)
- Parameters:
smtpPassword - Smtp password to use, when sending alert e-mails.
getAlertEmail
java.lang.String getAlertEmail()
- Returns:
- E-mail address, to whicha alerts will be sent. If this is an empty string or null, no
attemps of sending alerts will be sent.
setAlertEmail
void setAlertEmail(java.lang.String alertEmail)
- Parameters:
alertEmail - E-mail address, to whicha alerts will be sent. If this is an empty string or null, no
attemps of sending alerts will be sent.