Annotation Type CoherenceEventListener
-
@Documented @Retention(RUNTIME) @Target({ANNOTATION_TYPE,TYPE,METHOD}) @Executable(processOnStartup=true) public @interface CoherenceEventListener
An
Executable
advice annotation that allows listening for Coherence events.The method will ultimately be wrapped in either an
EventInterceptor
or aMapListener
. Various qualifier annotations can also be applied to further qualify the types of events and the target event source for a specific listener method. Listener methods can have any name but must take a single parameter that extends eitherEvent
orMapEvent
and returnvoid
.For example:
The following method will receive a
CacheLifecycleEvent
event every time a map or cache is created or destroyed.@CoherenceEventListener public void onEvent(CacheLifecycleEvent event) { }
- Since:
- 1.0
- Author:
- Jonathan Knight