public class CompositeKeyCacheEntryEvent extends CacheEntryEvent
If it's a general event, such as a cache CLEARED event it will just contain the timestamp as it was fired/created.
source
Constructor and Description |
---|
CompositeKeyCacheEntryEvent(Cache source,
EventType eventType)
Creates an cache event that indicates the cache was cleared, implying that it contains no
entries any longer.
|
CompositeKeyCacheEntryEvent(Cache source,
EventType eventType,
Object owner,
Object key,
Object value,
int sizeEstimate,
long lruTimeStamp,
long creationTimestamp)
Creates an cache event that references an entry.
|
CompositeKeyCacheEntryEvent(Cache source,
EventType eventType,
Object owner,
Object key,
Object newValue,
Object oldValue,
int sizeEstimate,
long lruTimeStamp,
long creationTimestamp)
Creates a cache event that references the new entry and hold the value of the old entry.
|
Modifier and Type | Method and Description |
---|---|
long |
getAge() |
long |
getCreationTimestamp() |
Object |
getKey()
Get the key of the composition, that's owned by the owner.
|
long |
getLastRecentUse() |
Object |
getOldValue()
Returns old value that existed before the the modification that fired the event.
|
Object |
getOwner()
Get the owner of the composition, owning the corresponding key.
|
int |
getSizeEstimate() |
Object |
getValue() |
boolean |
isOldValueAvailable()
Checks whether an old value is available.
|
getEventType, getSource
toString
public CompositeKeyCacheEntryEvent(Cache source, EventType eventType, Object owner, Object key, Object value, int sizeEstimate, long lruTimeStamp, long creationTimestamp)
It will contain the source of the event and the type. Moreover it will hold all of the necessary Information of the entry, such as its owner/key/value, estimated size, last recently used timestamp and the timestamp of the entries creation.
source
- The Cache
which fired the event.eventType
- The EventType
that occurred.owner
- The holding owner or null
if there is no owner.key
- The key of the entry.value
- The value of the entry.sizeEstimate
- The estimated size of the entry in bytes.lruTimeStamp
- The timestamp as the entry was last used.creationTimestamp
- The timestamp as the entry was created.public CompositeKeyCacheEntryEvent(Cache source, EventType eventType, Object owner, Object key, Object newValue, Object oldValue, int sizeEstimate, long lruTimeStamp, long creationTimestamp)
It will contain the source of the event and the type. Moreover it will hold all of the necessary information of the entry, such as its owner/key/value, estimated size, last recently used timestamp and the timestamp of the entries creation. In addition it holds also the old entry.
source
- The Cache
which fired the event.eventType
- The EventType
that occurred.owner
- The holding owner or null
if there is no owner.key
- The key of the entry.newValue
- The new value of the entry.oldValue
- The old value of the entry.sizeEstimate
- The estimated size of the entry in bytes.lruTimeStamp
- The timestamp as the entry was last used.creationTimestamp
- The timestamp as the entry was created.public CompositeKeyCacheEntryEvent(Cache source, EventType eventType)
An timestamp of its occurrence is being added.
source
- The Cache
which fired the event.eventType
- The EventType
that occurred. It must be an EventType.CLEARED
in this special case!public Object getOwner()
OwnerKeyComposition
public Object getKey()
OwnerKeyComposition
public Object getValue()
public Object getOldValue()
CacheEntryEvent
getOldValue
in class CacheEntryEvent
null
if there was no previous valuepublic boolean isOldValueAvailable()
CacheEntryEvent
isOldValueAvailable
in class CacheEntryEvent
public int getSizeEstimate()
public long getAge()
public long getCreationTimestamp()
public long getLastRecentUse()
Copyright © 2024 levigo holding gmbh. All rights reserved.