Examples of UnsafeCacheValue


Examples of com.bah.lucene.blockcache_v2.cachevalue.UnsafeCacheValue

  public CacheValue newInstance(CacheDirectory directory, String fileName, int cacheBlockSize) {
    switch (_store) {
    case ON_HEAP:
      return new ByteArrayCacheValue(cacheBlockSize);
    case OFF_HEAP:
      return new UnsafeCacheValue(cacheBlockSize);
    default:
      throw new RuntimeException("Unknown type [" + _store + "]");
    }
  }
View Full Code Here

Examples of org.apache.blur.store.blockcache_v2.cachevalue.UnsafeCacheValue

  private CacheValue createCacheValue(int cacheBlockSize) {
    switch (_store) {
    case ON_HEAP:
      return new ByteArrayCacheValue(cacheBlockSize);
    case OFF_HEAP:
      return new UnsafeCacheValue(cacheBlockSize);
    default:
      throw new RuntimeException("Unknown type [" + _store + "]");
    }
  }
View Full Code Here

Examples of org.apache.blur.store.blockcache_v2.cachevalue.UnsafeCacheValue

        .weigher(weigher).maximumWeightedCapacity(maximumWeightedCapacity).listener(listener).build();
    Cache cacheFactory = new Cache() {

      @Override
      public CacheValue newInstance(CacheDirectory directory, String fileName, int cacheBlockSize) {
        return new UnsafeCacheValue(cacheBlockSize);
      }

      @Override
      public long getFileId(CacheDirectory directory, String fileName) {
        return fileName.hashCode();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.