public class MetadataTransientCacheValue extends ImmortalCacheValue implements MetadataAware
TransientCacheEntry
which is MetadataAware
Modifier and Type | Class and Description |
---|---|
static class |
MetadataTransientCacheValue.Externalizer |
internalMetadata, value
Modifier | Constructor and Description |
---|---|
|
MetadataTransientCacheValue(Object value,
Metadata metadata,
long lastUsed) |
protected |
MetadataTransientCacheValue(Object value,
PrivateMetadata internalMetadata,
Metadata metadata,
long lastUsed) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendFieldsToString(StringBuilder builder) |
boolean |
canExpire() |
long |
getExpiryTime() |
long |
getLastUsed() |
long |
getMaxIdle() |
Metadata |
getMetadata()
Get metadata of this cache entry.
|
boolean |
isExpired(long now) |
boolean |
isMaxIdleExpirable() |
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
InternalCacheEntry<?,?> |
toInternalCacheEntry(Object key) |
clone, equals, getCreated, getInternalMetadata, getLifespan, getValue, hashCode, setInternalMetadata, setValue, toString
public MetadataTransientCacheValue(Object value, Metadata metadata, long lastUsed)
protected MetadataTransientCacheValue(Object value, PrivateMetadata internalMetadata, Metadata metadata, long lastUsed)
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 boolean canExpire()
canExpire
in interface InternalCacheValue
canExpire
in class ImmortalCacheValue
public boolean isMaxIdleExpirable()
isMaxIdleExpirable
in interface InternalCacheValue
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
protected void appendFieldsToString(StringBuilder builder)
appendFieldsToString
in class ImmortalCacheValue
Copyright © 2021 JBoss by Red Hat. All rights reserved.