org.ehcache.impl.internal.store.offheap
Class OffHeapValueHolder<V>

java.lang.Object
  extended by org.ehcache.core.spi.cache.AbstractValueHolder<V>
      extended by org.ehcache.impl.internal.store.offheap.OffHeapValueHolder<V>
All Implemented Interfaces:
java.io.Serializable, Store.ValueHolder<V>

public final class OffHeapValueHolder<V>
extends AbstractValueHolder<V>

OffHeapValueHolder

See Also:
Serialized Form

Field Summary
static java.util.concurrent.TimeUnit TIME_UNIT
           
 
Fields inherited from interface org.ehcache.core.spi.cache.Store.ValueHolder
NO_EXPIRE
 
Constructor Summary
OffHeapValueHolder(long id, V value, long creationTime, long expireTime)
           
OffHeapValueHolder(long id, V value, long creationTime, long expireTime, long lastAccessTime, long hits, org.terracotta.offheapstore.storage.portability.WriteContext writeContext)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 int hashCode()
           
protected  java.util.concurrent.TimeUnit nativeTimeUnit()
           
 void updateMetadata(Store.ValueHolder<V> valueFlushed)
           
 V value()
          Accessor to the value held by this mapping.
 void writeBack()
           
 
Methods inherited from class org.ehcache.core.spi.cache.AbstractValueHolder
accessed, creationTime, expirationTime, getId, hitRate, hits, isExpired, lastAccessTime, setExpirationTime, setHits, setLastAccessTime, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TIME_UNIT

public static final java.util.concurrent.TimeUnit TIME_UNIT
Constructor Detail

OffHeapValueHolder

public OffHeapValueHolder(long id,
                          V value,
                          long creationTime,
                          long expireTime)

OffHeapValueHolder

public OffHeapValueHolder(long id,
                          V value,
                          long creationTime,
                          long expireTime,
                          long lastAccessTime,
                          long hits,
                          org.terracotta.offheapstore.storage.portability.WriteContext writeContext)
Method Detail

value

public V value()
Description copied from interface: Store.ValueHolder
Accessor to the value held by this mapping.

Returns:
The value

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class AbstractValueHolder<V>

nativeTimeUnit

protected final java.util.concurrent.TimeUnit nativeTimeUnit()
Specified by:
nativeTimeUnit in class AbstractValueHolder<V>

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractValueHolder<V>

writeBack

public void writeBack()

updateMetadata

public void updateMetadata(Store.ValueHolder<V> valueFlushed)