Package org.infinispan.container.entries
Class AbstractInternalCacheEntry
- java.lang.Object
-
- org.infinispan.container.entries.AbstractInternalCacheEntry
-
- All Implemented Interfaces:
Cloneable
,Map.Entry
,CacheEntry
,InternalCacheEntry
,MetadataAware
- Direct Known Subclasses:
ImmortalCacheEntry
,MetadataMortalCacheEntry
,MetadataTransientCacheEntry
,MetadataTransientMortalCacheEntry
,MortalCacheEntry
,TransientCacheEntry
,TransientMortalCacheEntry
public abstract class AbstractInternalCacheEntry extends Object implements InternalCacheEntry
An abstract internal cache entry that is typically stored in the data container- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractInternalCacheEntry()
protected
AbstractInternalCacheEntry(Object key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractInternalCacheEntry
clone()
void
commit(DataContainer container)
Commits changesboolean
equals(Object o)
Object
getKey()
Retrieves the key to this entryMetadata
getMetadata()
Get metadata of this cache entry.int
hashCode()
boolean
isChanged()
boolean
isCreated()
boolean
isEvicted()
boolean
isL1Entry()
boolean
isNull()
Tests whether the entry represents a null value, typically used for repeatable read.boolean
isRemoved()
void
setChanged(boolean changed)
void
setCreated(boolean created)
void
setEvicted(boolean evicted)
void
setMetadata(Metadata metadata)
Set the metadata in the cache entry.void
setRemoved(boolean removed)
void
setSkipLookup(boolean skipLookup)
boolean
skipLookup()
String
toString()
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.container.entries.CacheEntry
commit, getCreated, getLastUsed, getLifespan, getMaxIdle, getValue, isLoaded, isValid, rollback, setCreated, setLastUsed, setLoaded, setValid, setValue, undelete
-
Methods inherited from interface org.infinispan.container.entries.InternalCacheEntry
canExpire, canExpireMaxIdle, getExpiryTime, isExpired, isExpired, reincarnate, reincarnate, toInternalCacheValue, touch, touch
-
-
-
-
Field Detail
-
key
protected Object key
-
-
Constructor Detail
-
AbstractInternalCacheEntry
protected AbstractInternalCacheEntry()
-
AbstractInternalCacheEntry
protected AbstractInternalCacheEntry(Object key)
-
-
Method Detail
-
commit
public final void commit(DataContainer container)
Description copied from interface:CacheEntry
Commits changes- Specified by:
commit
in interfaceCacheEntry
- Parameters:
container
- data container to commit to
-
setChanged
public void setChanged(boolean changed)
- Specified by:
setChanged
in interfaceCacheEntry
-
setCreated
public final void setCreated(boolean created)
- Specified by:
setCreated
in interfaceCacheEntry
-
setRemoved
public final void setRemoved(boolean removed)
- Specified by:
setRemoved
in interfaceCacheEntry
-
setEvicted
public final void setEvicted(boolean evicted)
- Specified by:
setEvicted
in interfaceCacheEntry
-
setSkipLookup
public void setSkipLookup(boolean skipLookup)
Description copied from interface:CacheEntry
- Specified by:
setSkipLookup
in interfaceCacheEntry
-
isNull
public final boolean isNull()
Description copied from interface:CacheEntry
Tests whether the entry represents a null value, typically used for repeatable read.- Specified by:
isNull
in interfaceCacheEntry
- Returns:
- true if this represents a null, false otherwise.
-
isChanged
public final boolean isChanged()
- Specified by:
isChanged
in interfaceCacheEntry
- Returns:
- true if this entry has changed since being read from the container, false otherwise.
-
isCreated
public final boolean isCreated()
- Specified by:
isCreated
in interfaceCacheEntry
- Returns:
- true if this entry has been newly created, false otherwise.
-
isRemoved
public final boolean isRemoved()
- Specified by:
isRemoved
in interfaceCacheEntry
- Returns:
- true if this entry has been removed since being read from the container, false otherwise.
-
isEvicted
public final boolean isEvicted()
- Specified by:
isEvicted
in interfaceCacheEntry
- Returns:
- true if this entry has been evicted since being read from the container, false otherwise.
-
skipLookup
public boolean skipLookup()
- Specified by:
skipLookup
in interfaceCacheEntry
- Returns:
true
if the value must not be fetch from an external source
-
getMetadata
public Metadata getMetadata()
Description copied from interface:MetadataAware
Get metadata of this cache entry.- Specified by:
getMetadata
in interfaceMetadataAware
- Returns:
- a Metadata instance
-
setMetadata
public void setMetadata(Metadata metadata)
Description copied from interface:MetadataAware
Set the metadata in the cache entry.- Specified by:
setMetadata
in interfaceMetadataAware
- Parameters:
metadata
- to apply to the cache entry
-
getKey
public final Object getKey()
Description copied from interface:CacheEntry
Retrieves the key to this entry- Specified by:
getKey
in interfaceCacheEntry
- Specified by:
getKey
in interfaceMap.Entry
- Returns:
- a key
-
isL1Entry
public boolean isL1Entry()
- Specified by:
isL1Entry
in interfaceInternalCacheEntry
- Returns:
true
if the entry is a L1 entry.
-
clone
public AbstractInternalCacheEntry clone()
- Specified by:
clone
in interfaceCacheEntry
- Specified by:
clone
in interfaceInternalCacheEntry
- Overrides:
clone
in classObject
-
equals
public final boolean equals(Object o)
-
-