package org.jboss.cache.notifications.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This annotation should be used on methods that need to be notified when the cache is used in a cluster and the cluster topology
 * changes (i.e., a member joins or leaves the cluster).
 * <p/>
 * Methods annotated with this annotation should accept a single parameter,
 * a {@link org.jboss.cache.notifications.event.ViewChangedEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
 * will be thrown when registering your listener.
 *
 * @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
 * @see CacheListener
 * @since 2.0.0
 */
// ensure this annotation is available at runtime.
@Retention(RetentionPolicy.RUNTIME)
// ensure that this annotation is applied to classes.
@Target(ElementType.METHOD)
public @interface ViewChanged
{
}
