Package org.infinispan.container.entries
Class TransientMortalCacheValue
- java.lang.Object
-
- org.infinispan.container.entries.ImmortalCacheValue
-
- org.infinispan.container.entries.MortalCacheValue
-
- org.infinispan.container.entries.TransientMortalCacheValue
-
- All Implemented Interfaces:
java.lang.Cloneable,InternalCacheValue
public class TransientMortalCacheValue extends MortalCacheValue
A transient, mortal cache value to correspond withTransientMortalCacheEntry- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTransientMortalCacheValue.Externalizer
-
Field Summary
Fields Modifier and Type Field Description protected longlastUsedprotected longmaxIdle-
Fields inherited from class org.infinispan.container.entries.MortalCacheValue
created, lifespan
-
Fields inherited from class org.infinispan.container.entries.ImmortalCacheValue
value
-
-
Constructor Summary
Constructors Constructor Description TransientMortalCacheValue(java.lang.Object value, long created, long lifespan, long maxIdle)TransientMortalCacheValue(java.lang.Object value, long created, long lifespan, long maxIdle, long lastUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransientMortalCacheValueclone()booleanequals(java.lang.Object o)longgetExpiryTime()longgetLastUsed()longgetMaxIdle()inthashCode()booleanisExpired(long now)voidsetLastUsed(long lastUsed)voidsetMaxIdle(long maxIdle)InternalCacheEntrytoInternalCacheEntry(java.lang.Object key)java.lang.StringtoString()-
Methods inherited from class org.infinispan.container.entries.MortalCacheValue
canExpire, getCreated, getLifespan, setCreated, setLifespan
-
Methods inherited from class org.infinispan.container.entries.ImmortalCacheValue
getMetadata, getValue, setValue
-
-
-
-
Method Detail
-
getMaxIdle
public long getMaxIdle()
- Specified by:
getMaxIdlein interfaceInternalCacheValue- Overrides:
getMaxIdlein classImmortalCacheValue- Returns:
- max idle time allowed
-
setMaxIdle
public void setMaxIdle(long maxIdle)
-
getLastUsed
public long getLastUsed()
- Specified by:
getLastUsedin interfaceInternalCacheValue- Overrides:
getLastUsedin classImmortalCacheValue- Returns:
- timestamp when the entry was last used
-
setLastUsed
public void setLastUsed(long lastUsed)
-
isExpired
public boolean isExpired(long now)
- Specified by:
isExpiredin interfaceInternalCacheValue- Overrides:
isExpiredin classMortalCacheValue- Parameters:
now- the current time as expressed bySystem.currentTimeMillis()- Returns:
- true if the entry has expired; false otherwise
-
toInternalCacheEntry
public InternalCacheEntry toInternalCacheEntry(java.lang.Object key)
- Specified by:
toInternalCacheEntryin interfaceInternalCacheValue- Overrides:
toInternalCacheEntryin classMortalCacheValue
-
getExpiryTime
public long getExpiryTime()
- Specified by:
getExpiryTimein interfaceInternalCacheValue- Overrides:
getExpiryTimein classMortalCacheValue
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classMortalCacheValue
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMortalCacheValue
-
toString
public java.lang.String toString()
- Overrides:
toStringin classMortalCacheValue
-
clone
public TransientMortalCacheValue clone()
- Overrides:
clonein classMortalCacheValue
-
-