@NotThreadSafe public class EventImpl<K,V> extends Object implements CacheEntryActivatedEvent, CacheEntryCreatedEvent, CacheEntriesEvictedEvent, CacheEntryLoadedEvent, CacheEntryModifiedEvent, CacheEntryPassivatedEvent, CacheEntryRemovedEvent, CacheEntryVisitedEvent, TransactionCompletedEvent, TransactionRegisteredEvent, CacheEntryInvalidatedEvent, DataRehashedEvent, TopologyChangedEvent, CacheEntryEvictedEvent
Constructor and Description |
---|
EventImpl() |
Modifier and Type | Method and Description |
---|---|
static <K,V> EventImpl<K,V> |
createEvent(Cache<K,V> cache,
Event.Type type) |
boolean |
equals(Object o) |
Cache<K,V> |
getCache() |
ConsistentHash |
getConsistentHashAtEnd() |
ConsistentHash |
getConsistentHashAtStart() |
Map<K,V> |
getEntries()
Retrieves entries being evicted.
|
GlobalTransaction |
getGlobalTransaction() |
K |
getKey() |
Collection<Address> |
getMembersAtEnd() |
Collection<Address> |
getMembersAtStart() |
int |
getNewTopologyId() |
Object |
getOldValue()
Regardless of whether isPre() is true or is
false, this method returns the value of the entry being
deleted.
|
Event.Type |
getType() |
V |
getValue()
Retrieves the value of the entry being activated.
|
int |
hashCode() |
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 |
setConsistentHashAtEnd(ConsistentHash consistentHashAtEnd) |
void |
setConsistentHashAtStart(ConsistentHash consistentHashAtStart) |
void |
setCreated(boolean created) |
void |
setEntries(Map<Object,Object> entries) |
void |
setKey(K key) |
void |
setNewTopologyId(int newTopologyId) |
void |
setOldValue(V oldValue) |
void |
setOriginLocal(boolean originLocal) |
void |
setPre(boolean pre) |
void |
setTransactionId(GlobalTransaction transaction) |
void |
setTransactionSuccessful(boolean transactionSuccessful) |
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 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 setConsistentHashAtStart(ConsistentHash consistentHashAtStart)
public void setConsistentHashAtEnd(ConsistentHash consistentHashAtEnd)
public void setNewTopologyId(int newTopologyId)
public V getValue()
CacheEntryActivatedEvent
getValue
in interface CacheEntryActivatedEvent
getValue
in interface CacheEntryCreatedEvent
getValue
in interface CacheEntryEvictedEvent
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 boolean isCreated()
CacheEntryModifiedEvent
isCreated
in interface CacheEntryModifiedEvent
public Object getOldValue()
CacheEntryRemovedEvent
getOldValue
in interface CacheEntryRemovedEvent
public void setValue(V value)
public void setCreated(boolean created)
public void setOldValue(V oldValue)
public Collection<Address> getMembersAtStart()
getMembersAtStart
in interface DataRehashedEvent
public Collection<Address> getMembersAtEnd()
getMembersAtEnd
in interface DataRehashedEvent
public int getNewTopologyId()
getNewTopologyId
in interface DataRehashedEvent
getNewTopologyId
in interface TopologyChangedEvent
public ConsistentHash getConsistentHashAtStart()
getConsistentHashAtStart
in interface DataRehashedEvent
getConsistentHashAtStart
in interface TopologyChangedEvent
public ConsistentHash getConsistentHashAtEnd()
getConsistentHashAtEnd
in interface DataRehashedEvent
getConsistentHashAtEnd
in interface TopologyChangedEvent
public Map<K,V> getEntries()
CacheEntriesEvictedEvent
getEntries
in interface CacheEntriesEvictedEvent
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.