Package org.infinispan.hotrod.event.impl
Class ModifiedEventImpl<K>
- java.lang.Object
-
- org.infinispan.hotrod.event.impl.AbstractClientEvent
-
- org.infinispan.hotrod.event.impl.ModifiedEventImpl<K>
-
- All Implemented Interfaces:
ClientCacheEntryModifiedEvent<K>,ClientEvent
public class ModifiedEventImpl<K> extends AbstractClientEvent implements ClientCacheEntryModifiedEvent<K>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.hotrod.event.ClientEvent
ClientEvent.Type
-
-
Constructor Summary
Constructors Constructor Description ModifiedEventImpl(byte[] listenerId, K key, long version, boolean retried)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KgetKey()Modifiedcache entry's key.ClientEvent.TypegetType()longgetVersion()Provides access to the version of the modified cache entry.booleanisCommandRetried()This will be true if the write command that caused this had to be retried again due to a topology change.StringtoString()-
Methods inherited from class org.infinispan.hotrod.event.impl.AbstractClientEvent
getListenerId
-
-
-
-
Constructor Detail
-
ModifiedEventImpl
public ModifiedEventImpl(byte[] listenerId, K key, long version, boolean retried)
-
-
Method Detail
-
getKey
public K getKey()
Description copied from interface:ClientCacheEntryModifiedEventModifiedcache entry's key.- Specified by:
getKeyin interfaceClientCacheEntryModifiedEvent<K>- Returns:
- an instance of the key with which a cache entry has been modified in the remote server(s).
-
getVersion
public long getVersion()
Description copied from interface:ClientCacheEntryModifiedEventProvides access to the version of the modified cache entry. This version can be used to invoke conditional operations on the server, such asRemoteCache#replaceWithVersion(Object, Object, long)orRemoteCache#removeWithVersion(Object, long)- Specified by:
getVersionin interfaceClientCacheEntryModifiedEvent<K>- Returns:
- a long containing the version of the modified cache entry.
-
isCommandRetried
public boolean isCommandRetried()
Description copied from interface:ClientCacheEntryModifiedEventThis 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:
isCommandRetriedin interfaceClientCacheEntryModifiedEvent<K>- Returns:
- Whether the command that caused this event was retried
-
getType
public ClientEvent.Type getType()
- Specified by:
getTypein interfaceClientEvent
-
-