@NotThreadSafe public class EventImpl<K,V> extends Object implements CacheEntryActivatedEvent, CacheEntryCreatedEvent, CacheEntriesEvictedEvent, CacheEntryLoadedEvent, CacheEntryModifiedEvent, CacheEntryPassivatedEvent, CacheEntryRemovedEvent, CacheEntryVisitedEvent, TransactionCompletedEvent, TransactionRegisteredEvent, CacheEntryInvalidatedEvent, DataRehashedEvent, TopologyChangedEvent, CacheEntryExpiredEvent, PartitionStatusChangedEvent, Cloneable
| Constructor and Description |
|---|
EventImpl() |
| Modifier and Type | Method and Description |
|---|---|
EventImpl<K,V> |
clone() |
static <K,V> EventImpl<K,V> |
createEvent(Cache<K,V> cache,
Event.Type type) |
boolean |
equals(Object o) |
AvailabilityMode |
getAvailabilityMode()
The mode the current cluster is in.
|
Cache<K,V> |
getCache() |
ConsistentHash |
getConsistentHashAtEnd() |
ConsistentHash |
getConsistentHashAtStart() |
Map<? extends K,? extends V> |
getEntries()
Retrieves entries being evicted.
|
GlobalTransaction |
getGlobalTransaction() |
K |
getKey() |
Collection<Address> |
getMembersAtEnd() |
Collection<Address> |
getMembersAtStart() |
Metadata |
getMetadata()
Retrieves the metadata associated with the entry.
|
int |
getNewTopologyId() |
Metadata |
getOldMetadata() |
V |
getOldValue()
Regardless of whether isPre() is true or is
false, this method returns the value of the entry being
deleted.
|
Event.Type |
getType() |
ConsistentHash |
getUnionConsistentHash() |
V |
getValue()
Retrieves the value of the entry being activated.
|
int |
hashCode() |
boolean |
isCommandRetried()
This will be true if the write command that caused this had to be retried again due to a topology change.
|
boolean |
isCreated()
Indicates whether the cache entry modification event is the result of
the cache entry being created.
|
boolean |
isOriginLocal() |
boolean |
isPre() |
boolean |
isTransactionSuccessful() |
void |
setAvailabilityMode(AvailabilityMode mode) |
void |
setCommandRetried(boolean commandRetried) |
void |
setConsistentHashAtEnd(ConsistentHash consistentHashAtEnd) |
void |
setConsistentHashAtStart(ConsistentHash consistentHashAtStart) |
void |
setCreated(boolean created) |
void |
setEntries(Map<? extends K,? extends V> entries) |
void |
setKey(K key) |
void |
setMetadata(Metadata metadata) |
void |
setNewTopologyId(int newTopologyId) |
void |
setOldMetadata(Metadata metadata) |
void |
setOldValue(V oldValue) |
void |
setOriginLocal(boolean originLocal) |
void |
setPre(boolean pre) |
void |
setTransactionId(GlobalTransaction transaction) |
void |
setTransactionSuccessful(boolean transactionSuccessful) |
void |
setUnionConsistentHash(ConsistentHash unionConsistentHash) |
void |
setValue(V value) |
String |
toString() |
public static <K,V> EventImpl<K,V> createEvent(Cache<K,V> cache, Event.Type type)
public Event.Type getType()
public boolean isPre()
public K getKey()
getKey in interface CacheEntryEventpublic GlobalTransaction getGlobalTransaction()
getGlobalTransaction in interface TransactionalEventpublic boolean isOriginLocal()
isOriginLocal in interface TransactionalEventpublic boolean isTransactionSuccessful()
isTransactionSuccessful in interface TransactionCompletedEventpublic void setPre(boolean pre)
public void setKey(K key)
public void setTransactionId(GlobalTransaction transaction)
public void setOriginLocal(boolean originLocal)
public void setTransactionSuccessful(boolean transactionSuccessful)
public void setConsistentHashAtStart(ConsistentHash consistentHashAtStart)
public void setConsistentHashAtEnd(ConsistentHash consistentHashAtEnd)
public void setUnionConsistentHash(ConsistentHash unionConsistentHash)
public void setNewTopologyId(int newTopologyId)
public void setMetadata(Metadata metadata)
public Metadata getMetadata()
CacheEntryEventgetMetadata in interface CacheEntryEventpublic void setOldMetadata(Metadata metadata)
public Metadata getOldMetadata()
public V getValue()
CacheEntryActivatedEventgetValue in interface CacheEntryActivatedEventgetValue in interface CacheEntryCreatedEventgetValue in interface CacheEntryEventgetValue in interface CacheEntryExpiredEventgetValue in interface CacheEntryInvalidatedEventgetValue in interface CacheEntryLoadedEventgetValue in interface CacheEntryModifiedEventgetValue in interface CacheEntryPassivatedEventgetValue in interface CacheEntryRemovedEventgetValue in interface CacheEntryVisitedEventpublic void setCommandRetried(boolean commandRetried)
public boolean isCommandRetried()
CacheEntryCreatedEventisCommandRetried in interface CacheEntryCreatedEventisCommandRetried in interface CacheEntryModifiedEventisCommandRetried in interface CacheEntryRemovedEventpublic boolean isCreated()
CacheEntryModifiedEventisCreated in interface CacheEntryModifiedEventpublic V getOldValue()
CacheEntryRemovedEventgetOldValue in interface CacheEntryRemovedEventpublic void setValue(V value)
public void setCreated(boolean created)
public void setOldValue(V oldValue)
public Collection<Address> getMembersAtStart()
getMembersAtStart in interface DataRehashedEventpublic Collection<Address> getMembersAtEnd()
getMembersAtEnd in interface DataRehashedEventpublic ConsistentHash getConsistentHashAtStart()
getConsistentHashAtStart in interface DataRehashedEventgetConsistentHashAtStart in interface TopologyChangedEventpublic ConsistentHash getConsistentHashAtEnd()
getConsistentHashAtEnd in interface DataRehashedEventgetConsistentHashAtEnd in interface TopologyChangedEventpublic ConsistentHash getUnionConsistentHash()
getUnionConsistentHash in interface DataRehashedEventpublic int getNewTopologyId()
getNewTopologyId in interface DataRehashedEventgetNewTopologyId in interface TopologyChangedEventpublic AvailabilityMode getAvailabilityMode()
PartitionStatusChangedEventgetAvailabilityMode in interface PartitionStatusChangedEventpublic void setAvailabilityMode(AvailabilityMode mode)
public Map<? extends K,? extends V> getEntries()
CacheEntriesEvictedEventgetEntries in interface CacheEntriesEvictedEventCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.