org.infinispan.container.entries
Class InternalEntryFactory
java.lang.Object
org.infinispan.container.entries.InternalEntryFactory
public class InternalEntryFactory
- extends Object
A factory for internal entries
- Since:
- 4.0
- Author:
- Manik Surtani
Method Summary |
static InternalCacheEntry |
create(Object key,
Object value)
|
static InternalCacheEntry |
create(Object key,
Object value,
long lifespan)
|
static InternalCacheEntry |
create(Object key,
Object value,
long lifespan,
long maxIdle)
|
static InternalCacheEntry |
create(Object key,
Object value,
long created,
long lifespan,
long lastUsed,
long maxIdle)
|
InternalCacheEntry |
createNewEntry(Object key,
Object value,
long lifespan,
long maxIdle)
|
static InternalCacheValue |
createValue(Object v)
|
static InternalCacheValue |
createValue(Object v,
long created,
long lifespan,
long lastUsed,
long maxIdle)
|
InternalCacheEntry |
update(InternalCacheEntry ice,
long lifespan,
long maxIdle)
Sets the values on the given internal cache entry, potentially reconstructing the entry to the most appropriate
type (Mortal, Immortal, Transient or TransientMortal) based on the lifespan and maxIdle being set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InternalEntryFactory
public InternalEntryFactory()
create
public static InternalCacheEntry create(Object key,
Object value)
create
public static InternalCacheEntry create(Object key,
Object value,
long lifespan)
create
public static InternalCacheEntry create(Object key,
Object value,
long lifespan,
long maxIdle)
create
public static InternalCacheEntry create(Object key,
Object value,
long created,
long lifespan,
long lastUsed,
long maxIdle)
createValue
public static InternalCacheValue createValue(Object v)
createValue
public static InternalCacheValue createValue(Object v,
long created,
long lifespan,
long lastUsed,
long maxIdle)
createNewEntry
public InternalCacheEntry createNewEntry(Object key,
Object value,
long lifespan,
long maxIdle)
update
public InternalCacheEntry update(InternalCacheEntry ice,
long lifespan,
long maxIdle)
- Sets the values on the given internal cache entry, potentially reconstructing the entry to the most appropriate
type (Mortal, Immortal, Transient or TransientMortal) based on the lifespan and maxIdle being set. As such,
callers must *always* assume that the InternalCacheEntry instance is being changed and must switch reference to
the instance being returned, even though this *may* not be a new instance at all.
- Parameters:
ice
- cache entry to work onlifespan
- lifespan to setmaxIdle
- max idle to set
- Returns:
- a cache entry
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.