Interface ClientCacheEntryCustomEvent<T>
- Type Parameters:
T
- Type of customized event data. It needs to be marshallable.
- All Superinterfaces:
ClientEvent
- All Known Implementing Classes:
CustomEventImpl
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
.
As a result of this conversion, custom events are reprenseted by this class,
and are expected in methods annotation with either
Converter
instances generated by a
invalid reference
org.infinispan.filter.ConverterFactory
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.client.hotrod.event.ClientEvent
ClientEvent.Type
-
Method Summary
Modifier and TypeMethodDescriptionCustomized event data.boolean
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 Details
-
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
-