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
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionImmortalCacheValue
(Object value) protected
ImmortalCacheValue
(Object value, PrivateMetadata internalMetadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendFieldsToString
(StringBuilder builder) boolean
clone()
boolean
long
long
final PrivateMetadata
long
long
long
getValue()
int
hashCode()
boolean
isExpired
(long now) final void
setInternalMetadata
(PrivateMetadata internalMetadata) final Object
InternalCacheEntry<?,
?> final String
toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.container.entries.InternalCacheValue
isMaxIdleExpirable
-
Field Details
-
value
-
internalMetadata
-
-
Constructor Details
-
ImmortalCacheValue
-
ImmortalCacheValue
-
-
Method Details
-
toInternalCacheEntry
- Specified by:
toInternalCacheEntry
in interfaceInternalCacheValue
-
setValue
-
getValue
- Specified by:
getValue
in interfaceInternalCacheValue
- Returns:
- the value represented by this internal wrapper
-
isExpired
public boolean isExpired(long now) - Specified by:
isExpired
in 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:
canExpire
in interfaceInternalCacheValue
- Returns:
- true if the entry can expire, false otherwise
-
getCreated
public long getCreated()- Specified by:
getCreated
in interfaceInternalCacheValue
- Returns:
- timestamp when the entry was created
-
getLastUsed
public long getLastUsed()- Specified by:
getLastUsed
in interfaceInternalCacheValue
- Returns:
- timestamp when the entry was last used
-
getLifespan
public long getLifespan()- Specified by:
getLifespan
in interfaceInternalCacheValue
- Returns:
- lifespan of the value
-
getMaxIdle
public long getMaxIdle()- Specified by:
getMaxIdle
in interfaceInternalCacheValue
- Returns:
- max idle time allowed
-
getExpiryTime
public long getExpiryTime()- Specified by:
getExpiryTime
in interfaceInternalCacheValue
-
getMetadata
- Specified by:
getMetadata
in interfaceInternalCacheValue
-
getInternalMetadata
- Specified by:
getInternalMetadata
in interfaceInternalCacheValue
-
setInternalMetadata
- Specified by:
setInternalMetadata
in interfaceInternalCacheValue
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
-
appendFieldsToString
-