|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Detached
Indicates that the marked method should be called when an object is detached from the POJO Cache instance.
The method can have any name, but should take a single parameter which is
either a DetachedEvent
or any superclass. Otherwise, an
IllegalArgumentException
will be thrown by
PojoCache.addListener(java.lang.Object)
Example:
@PojoCacheListener public class MyListener() { @Detached public void handleDetached(DetachedEvent event) { System.out.println("Object = " + even.getSource()); } }
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |