public class MetadataTransientCacheValue extends ImmortalCacheValue implements MetadataAware
TransientCacheEntry
which is
MetadataAware
Modifier and Type | Class and Description |
---|---|
static class |
MetadataTransientCacheValue.Externalizer |
value
Constructor and Description |
---|
MetadataTransientCacheValue(Object value,
Metadata metadata,
long lastUsed) |
Modifier and Type | Method and Description |
---|---|
boolean |
canExpire() |
long |
getExpiryTime() |
long |
getLastUsed() |
long |
getMaxIdle() |
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, getCreated, getLifespan, getValue, hashCode, setValue, toString
public InternalCacheEntry toInternalCacheEntry(Object key)
toInternalCacheEntry
in interface InternalCacheValue
toInternalCacheEntry
in class ImmortalCacheValue
public long getMaxIdle()
getMaxIdle
in interface InternalCacheValue
getMaxIdle
in class ImmortalCacheValue
public long getLastUsed()
getLastUsed
in interface InternalCacheValue
getLastUsed
in class ImmortalCacheValue
public final boolean isExpired(long now)
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
now
- the current time as expressed by System.currentTimeMillis()
public final boolean isExpired()
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
public boolean canExpire()
canExpire
in interface InternalCacheValue
canExpire
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 long getExpiryTime()
getExpiryTime
in interface InternalCacheValue
getExpiryTime
in class ImmortalCacheValue
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.