public class TransientCacheValue extends ImmortalCacheValue
TransientCacheEntry
Modifier and Type | Class and Description |
---|---|
static class |
TransientCacheValue.Externalizer |
Modifier and Type | Field and Description |
---|---|
protected long |
lastUsed |
protected long |
maxIdle |
internalMetadata, value
Modifier | Constructor and Description |
---|---|
|
TransientCacheValue(Object value,
long maxIdle,
long lastUsed) |
protected |
TransientCacheValue(Object value,
PrivateMetadata internalMetadata,
long maxIdle,
long lastUsed) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendFieldsToString(StringBuilder builder) |
boolean |
canExpire() |
TransientCacheValue |
clone() |
boolean |
equals(Object o) |
long |
getExpiryTime() |
long |
getLastUsed() |
long |
getMaxIdle() |
int |
hashCode() |
boolean |
isExpired(long now) |
boolean |
isMaxIdleExpirable() |
void |
setLastUsed(long lastUsed) |
void |
setMaxIdle(long maxIdle) |
InternalCacheEntry<?,?> |
toInternalCacheEntry(Object key) |
getCreated, getInternalMetadata, getLifespan, getMetadata, getValue, setInternalMetadata, setValue, toString
public TransientCacheValue(Object value, long maxIdle, long lastUsed)
protected TransientCacheValue(Object value, PrivateMetadata internalMetadata, long maxIdle, long lastUsed)
public long getMaxIdle()
getMaxIdle
in interface InternalCacheValue
getMaxIdle
in class ImmortalCacheValue
public void setMaxIdle(long maxIdle)
public long getLastUsed()
getLastUsed
in interface InternalCacheValue
getLastUsed
in class ImmortalCacheValue
public void setLastUsed(long lastUsed)
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()
public InternalCacheEntry<?,?> toInternalCacheEntry(Object key)
toInternalCacheEntry
in interface InternalCacheValue
toInternalCacheEntry
in class ImmortalCacheValue
public long getExpiryTime()
getExpiryTime
in interface InternalCacheValue
getExpiryTime
in class ImmortalCacheValue
public boolean equals(Object o)
equals
in class ImmortalCacheValue
public int hashCode()
hashCode
in class ImmortalCacheValue
public TransientCacheValue clone()
clone
in class ImmortalCacheValue
protected void appendFieldsToString(StringBuilder builder)
appendFieldsToString
in class ImmortalCacheValue
Copyright © 2021 JBoss by Red Hat. All rights reserved.