[infinispan-commits] Infinispan SVN: r1345 - trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Wed Jan 6 12:57:27 EST 2010
Author: manik.surtani at jboss.com
Date: 2010-01-06 12:57:26 -0500 (Wed, 06 Jan 2010)
New Revision: 1345
Modified:
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryActivatedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryCreatedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvictedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryInvalidatedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryLoadedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryModifiedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryPassivatedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryRemovedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryVisitedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/Event.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/EventImpl.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionCompletedEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionRegisteredEvent.java
trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionalEvent.java
Log:
Better Javadocs
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryActivatedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryActivatedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryActivatedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryActivated}.
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryActivated}.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryActivatedEvent extends CacheEntryEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryCreatedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryCreatedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryCreatedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated}.
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated}.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryCreatedEvent extends CacheEntryEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * Transactional events that additionally expose a key as such events pertain to a specific cache entry.
+ * A transactional event subtype that additionally expose a key as such events pertain to a specific cache entry.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryEvent extends TransactionalEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvictedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvictedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvictedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryEvicted}.
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryEvicted}.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryEvictedEvent extends CacheEntryEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryInvalidatedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryInvalidatedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryInvalidatedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * Notifies a listener of an invalidation event
+ * Notifies a listener of an invalidation event.
*
- * @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryInvalidatedEvent extends CacheEntryEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryLoadedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryLoadedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryLoadedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryLoaded}.
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryLoaded}.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryLoadedEvent extends CacheEntryEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryModifiedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryModifiedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryModifiedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,11 +22,21 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryModified}
- *
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryModified}
+ * <p />
+ * The {@link #getValue()} method's behavior is specific to whether the callback is triggered before or after the event
+ * in question. For example, if <tt>event.isPre()</tt> is <tt>true</tt>, then <tt>event.getValue()</tt> would return the
+ * <i>old</i> value, prior to modification. If <tt>event.isPre()</tt> is <tt>false</tt>, then <tt>event.getValue()</tt>
+ * would return new <i>new</i> value. If the event is creating and inserting a new entry, the old value would be <tt>null</tt>.
+ * <p />
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryModifiedEvent extends CacheEntryEvent {
+ /**
+ * Retrieves the value of the entry being modified.
+ * <p />
+ * @return the previous or new value of the entry, depending on whether isPre() is true or false.
+ */
Object getValue();
}
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryPassivatedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryPassivatedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryPassivatedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryPassivated}.
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryPassivated}.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryPassivatedEvent extends CacheEntryEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryRemovedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryRemovedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryRemovedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,11 +22,20 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryRemoved}.
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryRemoved}.
+ * <p />
+ * The {@link #getValue()} method would return the <i>old</i> value prior to deletion, if <tt>isPre()</tt> is <tt>true</tt>.
+ * If <tt>isPre()</tt> is <tt>false</tt>, {@link #getValue()} will return <tt>null</tt>.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryRemovedEvent extends CacheEntryEvent {
+
+ /**
+ * Retrieves the value of the entry being deleted.
+ * <p />
+ * @return the value of the entry being deleted, if <tt>isPre()</tt> is <tt>true</tt>. <tt>null</tt> otherwise.
+ */
Object getValue();
}
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryVisitedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryVisitedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryVisitedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -22,9 +22,9 @@
package org.infinispan.notifications.cachelistener.event;
/**
- * This event is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryVisited}.
+ * This event subtype is passed in to any method annotated with {@link org.infinispan.notifications.cachelistener.annotation.CacheEntryVisited}.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface CacheEntryVisitedEvent extends CacheEntryEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/Event.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/Event.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/Event.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -26,7 +26,7 @@
/**
* An interface that defines common characteristics of events
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface Event {
@@ -42,7 +42,7 @@
Type getType();
/**
- * @return true if the notification is before the event has occured, false if after the event has occured.
+ * @return <tt>true</tt> if the notification is before the event has occurred, <tt>false</tt> if after the event has occurred.
*/
boolean isPre();
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/EventImpl.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/EventImpl.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/EventImpl.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -30,7 +30,7 @@
/**
* Basic implementation of an event that covers all event types.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
@NotThreadSafe
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionCompletedEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionCompletedEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionCompletedEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -27,7 +27,7 @@
* Note that this event is only delivered <i>after the fact</i>, i.e., you will never see an instance of this event with
* {@link #isPre()} being set to <tt>true</tt>.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface TransactionCompletedEvent extends TransactionalEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionRegisteredEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionRegisteredEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionRegisteredEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -27,7 +27,7 @@
* Note that this event is only delivered <i>after the fact</i>, i.e., you will never see an instance of this event with
* {@link #isPre()} being set to <tt>true</tt>.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface TransactionRegisteredEvent extends TransactionalEvent {
Modified: trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionalEvent.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionalEvent.java 2010-01-06 17:41:07 UTC (rev 1344)
+++ trunk/core/src/main/java/org/infinispan/notifications/cachelistener/event/TransactionalEvent.java 2010-01-06 17:57:26 UTC (rev 1345)
@@ -24,10 +24,10 @@
import org.infinispan.transaction.xa.GlobalTransaction;
/**
- * An event type that includes a transaction context - if one exists - as well as a boolean as to whether the call
+ * An event subtype that includes a transaction context - if one exists - as well as a boolean as to whether the call
* originated locally or remotely.
*
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ * @author Manik Surtani
* @since 4.0
*/
public interface TransactionalEvent extends Event {
More information about the infinispan-commits
mailing list