public class DefaultCacheEventListenerConfiguration
extends org.ehcache.impl.internal.classes.ClassInstanceConfiguration<org.ehcache.event.CacheEventListener<?,?>>
implements org.ehcache.core.events.CacheEventListenerConfiguration<java.lang.Void>
ServiceConfiguration for the default CacheEventListenerProvider.
Enables configuring a CacheEventListener for a given cache.
This class overrides the default ServiceConfiguration.compatibleWith(ServiceConfiguration) implementation
to allow for the configuration of multiple cache event listeners on the same cache.
| Constructor and Description |
|---|
DefaultCacheEventListenerConfiguration(java.util.Set<org.ehcache.event.EventType> fireOn,
org.ehcache.event.CacheEventListener<?,?> listener)
Creates a new
DefaultCacheEventListenerConfiguration with the provided parameters. |
DefaultCacheEventListenerConfiguration(java.util.Set<org.ehcache.event.EventType> fireOn,
java.lang.Class<? extends org.ehcache.event.CacheEventListener<?,?>> clazz,
java.lang.Object... arguments)
Creates a new
DefaultCacheEventListenerConfiguration with the provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compatibleWith(org.ehcache.spi.service.ServiceConfiguration<?,?> other) |
java.util.EnumSet<org.ehcache.event.EventType> |
fireOn() |
org.ehcache.event.EventFiring |
firingMode() |
java.lang.Class<org.ehcache.core.events.CacheEventListenerProvider> |
getServiceType() |
org.ehcache.event.EventOrdering |
orderingMode() |
void |
setEventFiringMode(org.ehcache.event.EventFiring firingMode)
Sets the event firing mode on this configuration object.
|
void |
setEventOrderingMode(org.ehcache.event.EventOrdering orderingMode)
Sets the event orderign mode on this configuration object.
|
getArguments, getClazz, getInstancepublic DefaultCacheEventListenerConfiguration(java.util.Set<org.ehcache.event.EventType> fireOn,
java.lang.Class<? extends org.ehcache.event.CacheEventListener<?,?>> clazz,
java.lang.Object... arguments)
DefaultCacheEventListenerConfiguration with the provided parameters.
EventFiring.ASYNCHRONOUSEventOrdering.UNORDEREDfireOn - the events to fire onclazz - the cache event listener classarguments - optional constructor argumentssetEventFiringMode(EventFiring),
setEventOrderingMode(EventOrdering)public DefaultCacheEventListenerConfiguration(java.util.Set<org.ehcache.event.EventType> fireOn,
org.ehcache.event.CacheEventListener<?,?> listener)
DefaultCacheEventListenerConfiguration with the provided parameters.
EventFiring.ASYNCHRONOUSEventOrdering.UNORDEREDfireOn - the events to fire onlistener - the cache event listener instancesetEventFiringMode(EventFiring),
setEventOrderingMode(EventOrdering)public java.lang.Class<org.ehcache.core.events.CacheEventListenerProvider> getServiceType()
getServiceType in interface org.ehcache.spi.service.ServiceConfiguration<org.ehcache.core.events.CacheEventListenerProvider,java.lang.Void>public void setEventFiringMode(org.ehcache.event.EventFiring firingMode)
firingMode - the event firing modepublic void setEventOrderingMode(org.ehcache.event.EventOrdering orderingMode)
orderingMode - the event ordering modepublic org.ehcache.event.EventFiring firingMode()
firingMode in interface org.ehcache.core.events.CacheEventListenerConfiguration<java.lang.Void>public org.ehcache.event.EventOrdering orderingMode()
orderingMode in interface org.ehcache.core.events.CacheEventListenerConfiguration<java.lang.Void>public java.util.EnumSet<org.ehcache.event.EventType> fireOn()
fireOn in interface org.ehcache.core.events.CacheEventListenerConfiguration<java.lang.Void>public boolean compatibleWith(org.ehcache.spi.service.ServiceConfiguration<?,?> other)
compatibleWith in interface org.ehcache.spi.service.ServiceConfiguration<org.ehcache.core.events.CacheEventListenerProvider,java.lang.Void>