[jboss-cvs] JBossCache/src/org/jboss/cache/pojo ...

Jason Thomas Greene jgreene at jboss.com
Fri Jun 29 00:34:00 EDT 2007


  User: jgreene 
  Date: 07/06/29 00:34:00

  Modified:    src/org/jboss/cache/pojo   PojoCache.java
  Removed:     src/org/jboss/cache/pojo   PojoCacheListener.java
  Log:
  Implement new POJO Annotation Notification API
  
  Revision  Changes    Path
  1.5       +26 -9     JBossCache/src/org/jboss/cache/pojo/PojoCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/PojoCache.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- PojoCache.java	30 May 2007 20:58:57 -0000	1.4
  +++ PojoCache.java	29 Jun 2007 04:34:00 -0000	1.5
  @@ -11,6 +11,7 @@
   import java.util.regex.Pattern;
   
   import org.jboss.cache.Cache;
  +import org.jboss.cache.pojo.notification.annotation.PojoCacheListener;
   
   /**
    * <p>Main PojoCache APIs. PojoCache is an in-memory, transactional, fine-grained, and
  @@ -125,34 +126,50 @@
      void destroy() throws PojoCacheException;
   
      /**
  -    * Add a PojoCacheListener. A given listener instance can only be added once.
  +    * <p>
  +    * Add a PojoCache listener. A given listener instance can only be added once.
       * To have a duplicate listener simply create a new instance.
       * 
  +    * <p>
  +    * The listener must be annotated with the {@link PojoCacheListener} annotation, and
  +    * all callback methods need to be annotated with the respective event annotations.
  +    * Otherwise, an exception will be thrown.
  +    *
       * @param listener the listener instance to register
  +    * @throws IllegalArgumentException if listener does not conform to annotation requirements
  +    * @see PojoCacheListener for examples
       */
  -   void addListener(PojoCacheListener listener);
  +   void addListener(Object listener);
   
      /**
  -    * Add a PojoCacheListener that will only monitor a specific ID(FQN) pattern.
  +    * <p>
  +    * Add a PojoCache listener that will only monitor a specific ID(FQN) pattern.
       * A given listener instance can only be added once, whether or not there is
       * a pattern. To have a duplicate listener simply create a new instance.
       * 
  +    * <p>
  +    * The listener must be annotated with the {@link PojoCacheListener} annotation, and
  +    * all callback methods need to be annotated with the respective event annotations.
  +    * Otherwise, an exception will be thrown.
  +    *
       * @param listener the listener instance to register
       * @param pattern the ID pattern for notifications of interest
  +    * @throws IllegalArgumentException if listener does not conform to annotation requirements
  +    * @see PojoCacheListener for examples
       */
  -   void addListener(PojoCacheListener listener, Pattern pattern);
  +   void addListener(Object listener, Pattern pattern);
   
      /**
       * Retrieve a read-only list of listeners.
       */
  -   Collection<PojoCacheListener> getListeners();
  +   Collection<Object> getListeners();
   
      /**
       * Remove the specific listener. 
       *
       * @param listener the listener to remove
       */
  -   void removeListener(PojoCacheListener listener);
  +   void removeListener(Object listener);
   
      /**
       * Obtain the underlying generic cache system. Use this for non-POJO cache operation, e.g.
  
  
  



More information about the jboss-cvs-commits mailing list