Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.client.hotrod.event;

The events generated by default contain just enough information to make the event relevant but they avoid cramming too much information in order to reduce the cost of sending them. Optionally, the information shipped in the events can be customised in order to contain more information, such as values, or to contain even less information. This customization is done with org.infinispan.filter.Converter instances generated by a org.infinispan.filter.ConverterFactory. As a result of this conversion, custom events are reprenseted by this class, and are expected in methods annotation with either org.infinispan.client.hotrod.annotation.ClientCacheEntryCreated, org.infinispan.client.hotrod.annotation.ClientCacheEntryModified or, org.infinispan.client.hotrod.annotation.ClientCacheEntryRemoved. The event parameter for any of these callbacks is always a ClientCacheEntryCustomEvent, and if needed, the event's ClientEvent.getType() can be queried to find out whether the originating event was the result of create, modified or removed.

<T> Type of customized event data. It needs to be marshallable.
public interface ClientCacheEntryCustomEvent<T> extends ClientEvent {

Customized event data. It can be any type as long as it can be converted to binary format for shipping between the server and client.

an instance of the customised event data.
   T getEventData();

This will be true if the write command that caused this had to be retried again due to a topology change. This could be a sign that this event has been duplicated or another event was dropped and replaced (eg: ModifiedEvent replaced CreateEvent)

Whether the command that caused this event was retried
   boolean isCommandRetried();
New to GrepCode? Check out our FAQ X