org.apache.blur.store.blockcache_v2.cachevalue
Class ByteArrayCacheValue

java.lang.Object
  extended by org.apache.blur.store.blockcache_v2.cachevalue.BaseCacheValue
      extended by org.apache.blur.store.blockcache_v2.cachevalue.ByteArrayCacheValue
All Implemented Interfaces:
CacheValue

public class ByteArrayCacheValue
extends BaseCacheValue


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.blur.store.blockcache_v2.cachevalue.BaseCacheValue
BaseCacheValue.Evicted
 
Constructor Summary
ByteArrayCacheValue(int length)
           
 
Method Summary
 void release()
          Releases any underlying resources.
 CacheValue trim(int length)
          This method may trim the existing CacheValue and produce potentially a new CacheValue with the same data up to the length provided.
 
Methods inherited from class org.apache.blur.store.blockcache_v2.cachevalue.BaseCacheValue
decRef, detachFromCache, incRef, length, read, read, readInt, readLong, readShort, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayCacheValue

public ByteArrayCacheValue(int length)
Method Detail

release

public void release()
Description copied from interface: CacheValue
Releases any underlying resources.


trim

public CacheValue trim(int length)
Description copied from interface: CacheValue
This method may trim the existing CacheValue and produce potentially a new CacheValue with the same data up to the length provided. Also if a new CacheValue is produced then this method is responsible to calling release on the old CacheValue.

Specified by:
trim in interface CacheValue
Overrides:
trim in class BaseCacheValue
Parameters:
length - the valid amount of data in the CacheValue.
Returns:
new trim CacheValue that has been trimmed if needed.


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.