Interface ClientCacheEntryCustomEvent<T>

  • Type Parameters:
    T - Type of customized event data. It needs to be marshallable.
    All Superinterfaces:
    ClientEvent
    All Known Implementing Classes:
    CustomEventImpl

    public interface ClientCacheEntryCustomEvent<T>
    extends ClientEvent
    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 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 ClientCacheEntryCreated, ClientCacheEntryModified or, 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.
    • Method Detail

      • getEventData

        T getEventData()
        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.
        Returns:
        an instance of the customised event data.
      • isCommandRetried

        boolean isCommandRetried()
        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)
        Returns:
        Whether the command that caused this event was retried