@NotThreadSafe public class EventImpl<K,V> extends Object implements CacheEntryActivatedEvent, CacheEntryCreatedEvent, CacheEntriesEvictedEvent, CacheEntryLoadedEvent, CacheEntryModifiedEvent, CacheEntryPassivatedEvent, CacheEntryRemovedEvent, CacheEntryVisitedEvent, TransactionCompletedEvent, TransactionRegisteredEvent, CacheEntryInvalidatedEvent, DataRehashedEvent, TopologyChangedEvent, CacheEntryExpiredEvent, PartitionStatusChangedEvent, PersistenceAvailabilityChangedEvent, 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.
|
ConsistentHash |
getReadConsistentHashAtEnd() |
ConsistentHash |
getReadConsistentHashAtStart() |
Event.Type |
getType() |
ConsistentHash |
getUnionConsistentHash() |
V |
getValue()
Retrieves the value of the entry being activated.
|
ConsistentHash |
getWriteConsistentHashAtEnd() |
ConsistentHash |
getWriteConsistentHashAtStart() |
int |
hashCode() |
boolean |
isAvailable() |
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 |
isCurrentState() |
boolean |
isOriginLocal() |
boolean |
isPre() |
boolean |
isTransactionSuccessful() |
void |
setAvailabilityMode(AvailabilityMode mode) |
void |
setAvailable(boolean available) |
void |
setCommandRetried(boolean commandRetried) |
void |
setCreated(boolean created) |
void |
setCurrentState(boolean currentState) |
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 |
setReadConsistentHashAtEnd(ConsistentHash readConsistentHashAtEnd) |
void |
setReadConsistentHashAtStart(ConsistentHash readConsistentHashAtStart) |
void |
setTransactionId(GlobalTransaction transaction) |
void |
setTransactionSuccessful(boolean transactionSuccessful) |
void |
setUnionConsistentHash(ConsistentHash unionConsistentHash) |
void |
setValue(V value) |
void |
setWriteConsistentHashAtEnd(ConsistentHash writeConsistentHashAtEnd) |
void |
setWriteConsistentHashAtStart(ConsistentHash writeConsistentHashAtStart) |
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 CacheEntryEvent
public GlobalTransaction getGlobalTransaction()
getGlobalTransaction
in interface TransactionalEvent
public boolean isOriginLocal()
isOriginLocal
in interface TransactionalEvent
public boolean isTransactionSuccessful()
isTransactionSuccessful
in interface TransactionCompletedEvent
public 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 setReadConsistentHashAtStart(ConsistentHash readConsistentHashAtStart)
public void setWriteConsistentHashAtStart(ConsistentHash writeConsistentHashAtStart)
public void setReadConsistentHashAtEnd(ConsistentHash readConsistentHashAtEnd)
public void setWriteConsistentHashAtEnd(ConsistentHash writeConsistentHashAtEnd)
public void setUnionConsistentHash(ConsistentHash unionConsistentHash)
public void setNewTopologyId(int newTopologyId)
public void setMetadata(Metadata metadata)
public Metadata getMetadata()
CacheEntryEvent
getMetadata
in interface CacheEntryEvent
public boolean isCurrentState()
isCurrentState
in interface CacheEntryEvent
Listener.includeCurrentState()
set to true
.public void setCurrentState(boolean currentState)
public void setOldMetadata(Metadata metadata)
public Metadata getOldMetadata()
public V getValue()
CacheEntryActivatedEvent
getValue
in interface CacheEntryActivatedEvent
getValue
in interface CacheEntryCreatedEvent
getValue
in interface CacheEntryEvent
getValue
in interface CacheEntryExpiredEvent
getValue
in interface CacheEntryInvalidatedEvent
getValue
in interface CacheEntryLoadedEvent
getValue
in interface CacheEntryModifiedEvent
getValue
in interface CacheEntryPassivatedEvent
getValue
in interface CacheEntryRemovedEvent
getValue
in interface CacheEntryVisitedEvent
public void setCommandRetried(boolean commandRetried)
public boolean isCommandRetried()
CacheEntryCreatedEvent
isCommandRetried
in interface CacheEntryCreatedEvent
isCommandRetried
in interface CacheEntryModifiedEvent
isCommandRetried
in interface CacheEntryRemovedEvent
public boolean isCreated()
CacheEntryModifiedEvent
isCreated
in interface CacheEntryModifiedEvent
public V getOldValue()
CacheEntryRemovedEvent
getOldValue
in interface CacheEntryRemovedEvent
public void setValue(V value)
public void setCreated(boolean created)
public void setOldValue(V oldValue)
public boolean isAvailable()
isAvailable
in interface PersistenceAvailabilityChangedEvent
PersistenceManager
is available.public void setAvailable(boolean available)
public Collection<Address> getMembersAtStart()
getMembersAtStart
in interface DataRehashedEvent
public Collection<Address> getMembersAtEnd()
getMembersAtEnd
in interface DataRehashedEvent
public ConsistentHash getConsistentHashAtStart()
getConsistentHashAtStart
in interface DataRehashedEvent
getConsistentHashAtStart
in interface TopologyChangedEvent
public ConsistentHash getConsistentHashAtEnd()
getConsistentHashAtEnd
in interface DataRehashedEvent
getConsistentHashAtEnd
in interface TopologyChangedEvent
public ConsistentHash getReadConsistentHashAtStart()
getReadConsistentHashAtStart
in interface TopologyChangedEvent
public ConsistentHash getWriteConsistentHashAtStart()
getWriteConsistentHashAtStart
in interface TopologyChangedEvent
public ConsistentHash getReadConsistentHashAtEnd()
getReadConsistentHashAtEnd
in interface TopologyChangedEvent
public ConsistentHash getWriteConsistentHashAtEnd()
getWriteConsistentHashAtEnd
in interface TopologyChangedEvent
public ConsistentHash getUnionConsistentHash()
getUnionConsistentHash
in interface DataRehashedEvent
public int getNewTopologyId()
getNewTopologyId
in interface DataRehashedEvent
getNewTopologyId
in interface TopologyChangedEvent
public AvailabilityMode getAvailabilityMode()
PartitionStatusChangedEvent
getAvailabilityMode
in interface PartitionStatusChangedEvent
public void setAvailabilityMode(AvailabilityMode mode)
public Map<? extends K,? extends V> getEntries()
CacheEntriesEvictedEvent
getEntries
in interface CacheEntriesEvictedEvent
Copyright © 2021 JBoss by Red Hat. All rights reserved.