public class AlarmEhcacheClient extends Object implements AlarmCache
| Constructor and Description |
|---|
AlarmEhcacheClient() |
| Modifier and Type | Method and Description |
|---|---|
String |
getCacheName() |
String |
getConfigPath() |
int |
getDefaultInterval() |
void |
init()
Creates an ehcache CacheManager with the specified config file, and gets the cache with the cacheName from it.
|
void |
setCacheName(String name)
Sets the name of the cache to use.
|
void |
setConfigPath(String path)
Sets the path of the config file, located in the classpath.
|
void |
setDefaultInterval(int value)
Sets the default resend interval, for storing alarms unrelated to a specific channel,
in seconds.
|
boolean |
shouldResend(AlarmChannel channel,
String source,
String message) |
void |
shutdown()
Shuts down the ehcache CacheManager.
|
void |
store(AlarmChannel channel,
String source,
String message) |
public void setDefaultInterval(int value)
value - The number of seconds after which alarms with no specific channel expire.public int getDefaultInterval()
public void setConfigPath(String path)
path - The absolute path inside the classpath for the ehcache config.public String getConfigPath()
public void setCacheName(String name)
name - The name of the cache to use.public String getCacheName()
@PostConstruct public void init()
public void store(AlarmChannel channel, String source, String message)
store in interface AlarmCachepublic boolean shouldResend(AlarmChannel channel, String source, String message)
shouldResend in interface AlarmCachepublic void shutdown()
shutdown in interface AlarmCache