public class MetadataMortalCacheValue extends ImmortalCacheValue implements MetadataAware
MetadataMortalCacheEntry
Modifier and Type | Class and Description |
---|---|
static class |
MetadataMortalCacheValue.Externalizer |
value
Constructor and Description |
---|
MetadataMortalCacheValue(Object value,
Metadata metadata,
long created) |
Modifier and Type | Method and Description |
---|---|
boolean |
canExpire() |
long |
getCreated() |
long |
getExpiryTime() |
long |
getLifespan() |
Metadata |
getMetadata()
Get metadata of this cache entry.
|
boolean |
isExpired() |
boolean |
isExpired(long now) |
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
InternalCacheEntry |
toInternalCacheEntry(Object key) |
clone, equals, getLastUsed, getMaxIdle, getValue, hashCode, setValue, toString
public InternalCacheEntry toInternalCacheEntry(Object key)
toInternalCacheEntry
in interface InternalCacheValue
toInternalCacheEntry
in class ImmortalCacheValue
public Metadata getMetadata()
MetadataAware
getMetadata
in interface InternalCacheValue
getMetadata
in interface MetadataAware
getMetadata
in class ImmortalCacheValue
public void setMetadata(Metadata metadata)
MetadataAware
setMetadata
in interface MetadataAware
metadata
- to apply to the cache entrypublic final long getCreated()
getCreated
in interface InternalCacheValue
getCreated
in class ImmortalCacheValue
public final long getLifespan()
getLifespan
in interface InternalCacheValue
getLifespan
in class ImmortalCacheValue
public boolean isExpired(long now)
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
now
- the current time as expressed by System.currentTimeMillis()
public boolean isExpired()
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
public long getExpiryTime()
getExpiryTime
in interface InternalCacheValue
getExpiryTime
in class ImmortalCacheValue
public final boolean canExpire()
canExpire
in interface InternalCacheValue
canExpire
in class ImmortalCacheValue
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.