Class CustomEventImpl<T>
- java.lang.Object
-
- org.infinispan.client.hotrod.event.impl.AbstractClientEvent
-
- org.infinispan.client.hotrod.event.impl.CustomEventImpl<T>
-
- All Implemented Interfaces:
ClientCacheEntryCustomEvent<T>
,ClientEvent
public class CustomEventImpl<T> extends AbstractClientEvent implements ClientCacheEntryCustomEvent<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.client.hotrod.event.ClientEvent
ClientEvent.Type
-
-
Constructor Summary
Constructors Constructor Description CustomEventImpl(byte[] listenerId, T data, boolean retried, ClientEvent.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getEventData()
Customized event data.ClientEvent.Type
getType()
boolean
isCommandRetried()
This will be true if the write command that caused this had to be retried again due to a topology change.String
toString()
-
Methods inherited from class org.infinispan.client.hotrod.event.impl.AbstractClientEvent
getListenerId
-
-
-
-
Constructor Detail
-
CustomEventImpl
public CustomEventImpl(byte[] listenerId, T data, boolean retried, ClientEvent.Type type)
-
-
Method Detail
-
getEventData
public T getEventData()
Description copied from interface:ClientCacheEntryCustomEvent
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.- Specified by:
getEventData
in interfaceClientCacheEntryCustomEvent<T>
- Returns:
- an instance of the customised event data.
-
isCommandRetried
public boolean isCommandRetried()
Description copied from interface:ClientCacheEntryCustomEvent
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)- Specified by:
isCommandRetried
in interfaceClientCacheEntryCustomEvent<T>
- Returns:
- Whether the command that caused this event was retried
-
getType
public ClientEvent.Type getType()
- Specified by:
getType
in interfaceClientEvent
-
-