Package org.infinispan.container.entries
Class ImmortalCacheValue
java.lang.Object
org.infinispan.container.entries.ImmortalCacheValue
- All Implemented Interfaces:
Cloneable,InternalCacheValue
- Direct Known Subclasses:
MetadataImmortalCacheValue,MetadataMortalCacheValue,MetadataTransientCacheValue,MortalCacheValue,TransientCacheValue
An immortal cache value, to correspond with
ImmortalCacheEntry- Since:
- 4.0
- Author:
- Manik Surtani
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionImmortalCacheValue(Object value) protectedImmortalCacheValue(Object value, PrivateMetadata internalMetadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendFieldsToString(StringBuilder builder) booleanclone()booleanlonglongfinal PrivateMetadatalonglonglonggetValue()inthashCode()booleanisExpired(long now) final voidsetInternalMetadata(PrivateMetadata internalMetadata) final ObjectInternalCacheEntry<?,?> final StringtoString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.container.entries.InternalCacheValue
isMaxIdleExpirable
-
Field Details
-
value
-
internalMetadata
-
-
Constructor Details
-
ImmortalCacheValue
-
ImmortalCacheValue
-
-
Method Details
-
toInternalCacheEntry
- Specified by:
toInternalCacheEntryin interfaceInternalCacheValue
-
setValue
-
getValue
- Specified by:
getValuein interfaceInternalCacheValue- Returns:
- the value represented by this internal wrapper
-
isExpired
public boolean isExpired(long now) - Specified by:
isExpiredin interfaceInternalCacheValue- Parameters:
now- the current time as expressed bySystem.currentTimeMillis()- Returns:
- true if the entry has expired; false otherwise
-
canExpire
public boolean canExpire()- Specified by:
canExpirein interfaceInternalCacheValue- Returns:
- true if the entry can expire, false otherwise
-
getCreated
public long getCreated()- Specified by:
getCreatedin interfaceInternalCacheValue- Returns:
- timestamp when the entry was created
-
getLastUsed
public long getLastUsed()- Specified by:
getLastUsedin interfaceInternalCacheValue- Returns:
- timestamp when the entry was last used
-
getLifespan
public long getLifespan()- Specified by:
getLifespanin interfaceInternalCacheValue- Returns:
- lifespan of the value
-
getMaxIdle
public long getMaxIdle()- Specified by:
getMaxIdlein interfaceInternalCacheValue- Returns:
- max idle time allowed
-
getExpiryTime
public long getExpiryTime()- Specified by:
getExpiryTimein interfaceInternalCacheValue
-
getMetadata
- Specified by:
getMetadatain interfaceInternalCacheValue
-
getInternalMetadata
- Specified by:
getInternalMetadatain interfaceInternalCacheValue
-
setInternalMetadata
- Specified by:
setInternalMetadatain interfaceInternalCacheValue
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
-
appendFieldsToString
-