org.infinispan.notifications.cachelistener.annotation
Annotation Type TopologyChanged


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

This annotation should be used on methods that need to be notified when the ConsistentHash implementation in use by the DistributionManager changes due to a change in cluster topology. This is only fired in a Configuration.CacheMode#DIST_SYNC or Configuration.CacheMode#DIST_ASYNC configured cache.

Methods annotated with this annotation should accept a single parameter, a TopologyChangedEvent otherwise a IncorrectListenerException will be thrown when registering your listener.

Note that methods marked with this annotation will be fired before and after the updated ConsistentHash is installed, i.e., your method will be called twice, with Event.isPre() being set to true as well as false.

Since:
5.0
Author:
Manik Surtani
See Also:
Listener


-->

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