Annotation Type DataRehashed

@Retention(RUNTIME) @Target(METHOD) public @interface DataRehashed
This annotation should be used on methods that need to be notified when a rehash starts or ends. A "rehash" (or "rebalance") is the interval during which nodes are transferring data between each other. When the event with pre = false is fired all nodes have received all data; Some nodes can still keep old data, though - old data cleanup is executed after this event is fired.

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

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

Any exceptions thrown by the listener will abort the call. Any other listeners not yet called will not be called, and any transactions in progress will be rolled back.

Manik Surtani
See Also: