Package com.bah.lucene.blockcache_v2.cachevalue

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


        cacheBlockSizeMap.put(fieldType, cacheBlockSizeForFile);
        LOG.info(MessageFormat.format("{0}={1} for file type [{2}]", key, cacheBlockSizeForFile, fieldType));
      }
    }

    final STORE store = STORE.valueOf(configuration.get(BLUR_SHARD_BLOCK_CACHE_V2_STORE, OFF_HEAP));
    LOG.info(MessageFormat.format("{0}={1}", BLUR_SHARD_BLOCK_CACHE_V2_STORE, store));

    final Set<String> cachingFileExtensionsForRead = getSet(configuration.get(
        BLUR_SHARD_BLOCK_CACHE_V2_READ_CACHE_EXT, DEFAULT_VALUE));
    LOG.info(MessageFormat.format("{0}={1}", BLUR_SHARD_BLOCK_CACHE_V2_READ_CACHE_EXT, cachingFileExtensionsForRead));
View Full Code Here


  @Override
  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

  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

  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

        .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

Related Classes of com.bah.lucene.blockcache_v2.cachevalue.UnsafeCacheValue

Copyright © 2018 www.massapicom. 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.