org.jboss.cache.pojo.notification.annotation
Annotation Type SetModified


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface SetModified

Indicates that the marked method should be called when an attached set is modified.

The method can have any name, but should take a single parameter which is either a SetModifiedEvent or any superclass. Otherwise, an IllegalArgumentException will be thrown by PojoCache.addListener(java.lang.Object)

Example:

    @PojoCacheSetener
    public class MySetener()
    {
       @SetModified
       public void handleModified(SetModifiedEvent event)
       {
          System.out.println("Set = " + even.getSource());
       }
    }
 

Author:
Jason T. Greene



Copyright 2008 JBoss, a division of Red Hat. All Rights Reserved.