|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ehcache.config.builders.CacheEventListenerConfigurationBuilder
public class CacheEventListenerConfigurationBuilder
The CacheEventListenerConfigurationBuilder enables building CacheEventListenerConfigurations using a
fluent style.
As with all Ehcache builders, all instances are immutable and calling any method on the builder will return a new instance without modifying the one on which the method was called. This enables the sharing of builder instances without any risk of seeing them modified by code elsewhere.
| Method Summary | |
|---|---|
CacheEventListenerConfigurationBuilder |
asynchronous()
Sets the returned builder for asynchronous event processing. |
DefaultCacheEventListenerConfiguration |
build()
Builds the CacheEventListenerConfiguration this builder represents. |
CacheEventListenerConfigurationBuilder |
constructedWith(java.lang.Object... arguments)
Adds arguments that will be passed to the constructor of the CacheEventListener subclass configured
previously. |
CacheEventListenerConfigurationBuilder |
eventOrdering(EventOrdering eventOrdering)
Adds specific EventOrdering to the returned builder. |
CacheEventListenerConfigurationBuilder |
firingMode(EventFiring eventFiringMode)
Adds specific EventFiring to the returned builder. |
static CacheEventListenerConfigurationBuilder |
newEventListenerConfiguration(CacheEventListener<?,?> listener,
EventType eventType,
EventType... eventTypes)
Creates a new builder instance using the given CacheEventListener instance and the EventTypes it
will listen to. |
static CacheEventListenerConfigurationBuilder |
newEventListenerConfiguration(CacheEventListener<?,?> listener,
java.util.Set<EventType> eventSetToFireOn)
Creates a new builder instance using the given CacheEventListener instance and the set of EventTypes
to listen to. |
static CacheEventListenerConfigurationBuilder |
newEventListenerConfiguration(java.lang.Class<? extends CacheEventListener<?,?>> listenerClass,
EventType eventType,
EventType... eventTypes)
Creates a new builder instance using the given CacheEventListener subclass and the EventTypes it
will listen to. |
static CacheEventListenerConfigurationBuilder |
newEventListenerConfiguration(java.lang.Class<? extends CacheEventListener<?,?>> listenerClass,
java.util.Set<EventType> eventSetToFireOn)
Creates a new builder instance using the given CacheEventListener subclass and the set of EventTypes
to listen to. |
CacheEventListenerConfigurationBuilder |
ordered()
Sets the returned builder for ordered event processing. |
CacheEventListenerConfigurationBuilder |
synchronous()
Sets the returned builder for synchronous event processing. |
CacheEventListenerConfigurationBuilder |
unordered()
Sets the returned builder for unordered event processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CacheEventListenerConfigurationBuilder newEventListenerConfiguration(java.lang.Class<? extends CacheEventListener<?,?>> listenerClass,
EventType eventType,
EventType... eventTypes)
CacheEventListener subclass and the EventTypes it
will listen to.
EventOrdering defaults to EventOrdering.UNORDEREDEventFiring defaults to EventFiring.ASYNCHRONOUS
listenerClass - the CacheEventListener subclasseventType - the mandatory event type to listen toeventTypes - optional additional event types to listen to
public static CacheEventListenerConfigurationBuilder newEventListenerConfiguration(CacheEventListener<?,?> listener,
EventType eventType,
EventType... eventTypes)
CacheEventListener instance and the EventTypes it
will listen to.
EventOrdering defaults to EventOrdering.UNORDEREDEventFiring defaults to EventFiring.ASYNCHRONOUS
listener - the CacheEventListener instanceeventType - the mandatory event type to listen toeventTypes - optional additional event types to listen to
public static CacheEventListenerConfigurationBuilder newEventListenerConfiguration(java.lang.Class<? extends CacheEventListener<?,?>> listenerClass,
java.util.Set<EventType> eventSetToFireOn)
throws java.lang.IllegalArgumentException
CacheEventListener subclass and the set of EventTypes
to listen to.
EventOrdering defaults to EventOrdering.UNORDEREDEventFiring defaults to EventFiring.ASYNCHRONOUS
listenerClass - the CacheEventListener subclasseventSetToFireOn - the set of events to listen to, cannot be empty
java.lang.IllegalArgumentException - if the eventSetToFireOn is empty
public static CacheEventListenerConfigurationBuilder newEventListenerConfiguration(CacheEventListener<?,?> listener,
java.util.Set<EventType> eventSetToFireOn)
throws java.lang.IllegalArgumentException
CacheEventListener instance and the set of EventTypes
to listen to.
EventOrdering defaults to EventOrdering.UNORDEREDEventFiring defaults to EventFiring.ASYNCHRONOUS
listener - the CacheEventListener instanceeventSetToFireOn - the set of events to listen to, cannot be empty
java.lang.IllegalArgumentException - if the eventSetToFireOn is emptypublic CacheEventListenerConfigurationBuilder constructedWith(java.lang.Object... arguments)
CacheEventListener subclass configured
previously.
arguments - the constructor arguments
java.lang.IllegalArgumentException - if this builder is instance basedpublic CacheEventListenerConfigurationBuilder eventOrdering(EventOrdering eventOrdering)
EventOrdering to the returned builder.
EventOrdering defaults to EventOrdering.UNORDERED
eventOrdering - the EventOrdering to use
ordered(),
unordered()public CacheEventListenerConfigurationBuilder ordered()
unordered(),
eventOrdering(EventOrdering)public CacheEventListenerConfigurationBuilder unordered()
ordered(),
eventOrdering(EventOrdering)public CacheEventListenerConfigurationBuilder firingMode(EventFiring eventFiringMode)
EventFiring to the returned builder.
EventFiring defaults to EventFiring.ASYNCHRONOUS
eventFiringMode - the EventFiring to use
synchronous(),
asynchronous()public CacheEventListenerConfigurationBuilder synchronous()
asynchronous(),
firingMode(EventFiring)public CacheEventListenerConfigurationBuilder asynchronous()
synchronous(),
firingMode(EventFiring)public DefaultCacheEventListenerConfiguration build()
CacheEventListenerConfiguration this builder represents.
build in interface Builder<CacheEventListenerConfiguration>CacheEventListenerConfiguration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||