Class ImmortalCacheValue
java.lang.Object
org.infinispan.container.entries.ImmortalCacheValue
- All Implemented Interfaces:
Cloneable
,InternalCacheValue
- Direct Known Subclasses:
MetadataImmortalCacheValue
,MetadataMortalCacheValue
,MetadataTransientCacheValue
,MortalCacheValue
,TransientCacheValue
@ProtoTypeId(1087)
public class ImmortalCacheValue
extends Object
implements InternalCacheValue, Cloneable
An immortal cache value, to correspond with
ImmortalCacheEntry
- Since:
- 4.0
- Author:
- Manik Surtani
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImmortalCacheValue
(Object value) ImmortalCacheValue
(Object value, PrivateMetadata internalMetadata) ImmortalCacheValue
(org.infinispan.marshall.protostream.impl.MarshallableObject<?> wrappedValue, PrivateMetadata internalMetadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendFieldsToString
(StringBuilder builder) boolean
clone()
boolean
long
long
final PrivateMetadata
long
long
long
getValue()
org.infinispan.marshall.protostream.impl.MarshallableObject
<?> 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
-
ImmortalCacheValue
@ProtoFactory public ImmortalCacheValue(org.infinispan.marshall.protostream.impl.MarshallableObject<?> wrappedValue, PrivateMetadata internalMetadata)
-
-
Method Details
-
getWrappedValue
@ProtoField(number=1, name="value") public org.infinispan.marshall.protostream.impl.MarshallableObject<?> getWrappedValue() -
getInternalMetadata
- Specified by:
getInternalMetadata
in interfaceInternalCacheValue
-
setInternalMetadata
- Specified by:
setInternalMetadata
in interfaceInternalCacheValue
-
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
-
equals
-
hashCode
-
toString
-
clone
-
appendFieldsToString
-