Interface ClientCacheEntryCustomEvent<T>
-
- Type Parameters:
T
- Type of customized event data. It needs to be marshallable.
- All Superinterfaces:
ClientEvent
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 withConverter
instances generated by aorg.infinispan.filter.ConverterFactory
. As a result of this conversion, custom events are reprenseted by this class, and are expected in methods annotation with eitherClientCacheEntryCreated
,ClientCacheEntryModified
or,ClientCacheEntryRemoved
. The event parameter for any of these callbacks is always aClientCacheEntryCustomEvent
, and if needed, the event'sClientEvent.getType()
can be queried to find out whether the originating event was the result of create, modified or removed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.client.hotrod.event.ClientEvent
ClientEvent.Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getEventData()
Customized event data.boolean
isCommandRetried()
This will be true if the write command that caused this had to be retried again due to a topology change.-
Methods inherited from interface org.infinispan.client.hotrod.event.ClientEvent
getType
-
-
-
-
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
-
-