org.ehcache.impl.internal.store.heap.holders
Class CopiedOnHeapValueHolder<V>
java.lang.Object
org.ehcache.core.spi.cache.AbstractValueHolder<V>
org.ehcache.impl.internal.store.heap.holders.OnHeapValueHolder<V>
org.ehcache.impl.internal.store.heap.holders.CopiedOnHeapValueHolder<V>
- All Implemented Interfaces:
- java.io.Serializable, Store.ValueHolder<V>
public class CopiedOnHeapValueHolder<V>
- extends OnHeapValueHolder<V>
- See Also:
- Serialized Form
Constructor Summary |
protected |
CopiedOnHeapValueHolder(long id,
V value,
long creationTime,
long expirationTime,
boolean veto,
Copier<V> valueCopier)
|
|
CopiedOnHeapValueHolder(Store.ValueHolder<V> valueHolder,
V value,
boolean veto,
Copier<V> valueCopier,
long now,
Duration expiration)
Constructor to build this value holder from another value holder. |
|
CopiedOnHeapValueHolder(V value,
long creationTime,
boolean veto,
Copier<V> valueCopier)
|
|
CopiedOnHeapValueHolder(V value,
long creationTime,
long expirationTime,
boolean veto,
Copier<V> valueCopier)
|
Method Summary |
V |
value()
Accessor to the value held by this mapping. |
Methods inherited from class org.ehcache.core.spi.cache.AbstractValueHolder |
accessed, creationTime, expirationTime, getId, hashCode, hitRate, hits, isExpired, lastAccessTime, setExpirationTime, setHits, setLastAccessTime, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
CopiedOnHeapValueHolder
protected CopiedOnHeapValueHolder(long id,
V value,
long creationTime,
long expirationTime,
boolean veto,
Copier<V> valueCopier)
CopiedOnHeapValueHolder
public CopiedOnHeapValueHolder(Store.ValueHolder<V> valueHolder,
V value,
boolean veto,
Copier<V> valueCopier,
long now,
Duration expiration)
- Constructor to build this value holder from another value holder.
As such we assume that the passed in value is internal and so has been copied for write already elsewhere.
- Parameters:
valueHolder
- reference value holdervalue
- the valuevalueCopier
- the copier to use for copyForReadnow
- timestamp in millisexpiration
- computed expiration duration
CopiedOnHeapValueHolder
public CopiedOnHeapValueHolder(V value,
long creationTime,
boolean veto,
Copier<V> valueCopier)
CopiedOnHeapValueHolder
public CopiedOnHeapValueHolder(V value,
long creationTime,
long expirationTime,
boolean veto,
Copier<V> valueCopier)
value
public V value()
- Description copied from interface:
Store.ValueHolder
- Accessor to the value held by this mapping.
- Returns:
- The value