Package com.tangosol.util
Interface CollectionEvent<V>
- All Known Implementing Classes:
AbstractKeyBasedMap.DeferredCacheEvent,CacheEvent,ConverterCollections.ConverterCacheEvent,ConverterCollections.ConverterMapEvent,MapEvent,MapListenerSupport.FilterEvent,OverflowMap.HistoricCacheEvent
public interface CollectionEvent<V>
-
Method Summary
Modifier and TypeMethodDescriptionintgetId()Return this event's id.Return a new value associated with this event.Return an old value associated with this event.intReturn the partition this event represents or -1 if the event source is not partition aware.longReturn the version that represents the change that caused this event.booleanisDelete()Determine whether this event is a delete event.booleanisInsert()Determine whether this event is an insert event.booleanisUpdate()Determine whether this event is an update event.
-
Method Details
-
getId
int getId()Return this event's id. The event id is one of the ENTRY_* enumerated constants.- Returns:
- an id
-
getOldValue
V getOldValue()Return an old value associated with this event.The old value represents a value deleted from or updated in a collection. It is always null for "insert" notifications.
- Returns:
- an old value
-
getNewValue
V getNewValue()Return a new value associated with this event.The new value represents a new value inserted into or updated in a collection. It is always null for "delete" notifications.
- Returns:
- a new value
-
getPartition
int getPartition()Return the partition this event represents or -1 if the event source is not partition aware.- Returns:
- the partition this event represents or -1 if the event source is not partition aware
-
getVersion
long getVersion()Return the version that represents the change that caused this event. The meaning of this version, and therefore causality of versions, is defined by the event source.- Returns:
- the version that represents the change that caused this event
-
isInsert
boolean isInsert()Determine whether this event is an insert event.- Returns:
trueif this event is an insert event
-
isUpdate
boolean isUpdate()Determine whether this event is an update event.- Returns:
trueif this event is an update event
-
isDelete
boolean isDelete()Determine whether this event is a delete event.- Returns:
trueif this event is a delete event
-