Examples of CacheConfig


Examples of com.belladati.httpclientandroidlib.impl.client.cache.CacheConfig

      int socketTimeout = readFromProperty("bdSocketTimeout", globalTimeout);
      RequestConfig requestConfig = RequestConfig.copy(RequestConfig.DEFAULT).setConnectTimeout(connectTimeout)
        .setSocketTimeout(socketTimeout).setConnectionRequestTimeout(connectionRequestTimeout).build();

      // configure caching
      CacheConfig cacheConfig = CacheConfig.copy(CacheConfig.DEFAULT).setSharedCache(false).setMaxCacheEntries(1000)
        .setMaxObjectSize(2 * 1024 * 1024).build();

      // configure connection pooling
      PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager();
      int connectionLimit = readFromProperty("bdMaxConnections", 40);
View Full Code Here

Examples of com.hazelcast.config.CacheConfig

    @Test
    public void testCachesTypedConfig() {
        CacheManager cacheManager = cachingProvider1.getCacheManager();

        CacheConfig<Integer, Long> config = new CacheConfig();
        String cacheName = "test";
        config.setName(cacheName);
        config.setTypes(Integer.class, Long.class);

        Cache<Integer, Long> cache = cacheManager.createCache(cacheName, config);
        Cache<Integer, Long> cache2 = cacheManager.getCache(cacheName, config.getKeyType(), config.getValueType());

        assertNotNull(cache);
        assertNotNull(cache2);
    }
View Full Code Here

Examples of io.druid.client.cache.CacheConfig

          }
        },
        cache,
        jsonMapper,
        new CacheConfig()
        {
          @Override
          public boolean isQueryCacheable(Query query)
          {
            return true;
View Full Code Here

Examples of net.sf.cache4j.CacheConfig

     */
    public void addCache(Cache cache) throws CacheException {
        if(cache==null){
            throw new NullPointerException("cache is null");
        }
        CacheConfig cacheConfig = cache.getCacheConfig();
        if(cacheConfig==null) {
            throw new NullPointerException("cache config is null");
        }
        if(cacheConfig.getCacheId()==null) {
            throw new NullPointerException("config.getCacheId() is null");
        }
        if(!(cache instanceof Cache)) {
            throw new CacheException("cache not instance of "+ManagedCache.class.getName());
        }

        synchronized(_cacheMap){
            if(_cacheMap.containsKey(cacheConfig.getCacheId())) {
                throw new CacheException("Cache id:"+cacheConfig.getCacheId()+" exists");
            }

            _cacheMap.put(cacheConfig.getCacheId(), cache);
        }
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.CacheConfig

      FileStatus[] hfiles = fs.listStatus(cf.getPath());
      for (FileStatus hfile : hfiles) {
        byte[] start, end;
        HFile.Reader hf = null;
        try {
          CacheConfig cacheConf = new CacheConfig(getConf());
          hf = HFile.createReader(fs, hfile.getPath(), cacheConf);
          hf.loadFileInfo();
          KeyValue startKv = KeyValue.createKeyValueFromKey(hf.getFirstKey());
          start = startKv.getRow();
          KeyValue endKv = KeyValue.createKeyValueFromKey(hf.getLastKey());
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.CacheConfig

    this.minFilesToCompact = Math.max(2,
      conf.getInt("hbase.hstore.compaction.min",
        /*old name*/ conf.getInt("hbase.hstore.compactionThreshold", 3)));

    // Setting up cache configuration for this family
    this.cacheConf = new CacheConfig(conf, family);
    this.blockingStoreFileCount =
      conf.getInt("hbase.hstore.blockingStoreFiles", 7);

    this.maxFilesToCompact = conf.getInt("hbase.hstore.compaction.max", 10);
    this.minCompactSize = conf.getLong("hbase.hstore.compaction.min.size",
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.CacheConfig

   * @return Writer for a new StoreFile in the tmp dir.
   */
  public StoreFile.Writer createWriterInTmp(int maxKeyCount,
    Compression.Algorithm compression, boolean isCompaction)
  throws IOException {
    final CacheConfig writerCacheConf;
    if (isCompaction) {
      // Don't cache data on write on compactions.
      writerCacheConf = new CacheConfig(cacheConf);
      writerCacheConf.setCacheDataOnWrite(false);
    } else {
      writerCacheConf = cacheConf;
    }
    StoreFile.Writer w = new StoreFile.WriterBuilder(conf, writerCacheConf,
        fs, blocksize)
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.CacheConfig

    // login the server principal (if using secure Hadoop)
    User.login(this.conf, "hbase.regionserver.keytab.file",
      "hbase.regionserver.kerberos.principal", this.isa.getHostName());
    regionServerAccounting = new RegionServerAccounting();
    cacheConfig = new CacheConfig(conf);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.CacheConfig

    new HRegionServerCommandLine(regionServerClass).doMain(args);
  }

  @Override
  public List<BlockCacheColumnFamilySummary> getBlockCacheColumnFamilySummaries() throws IOException {
    BlockCache c = new CacheConfig(this.conf).getBlockCache();
    return c.getBlockCacheColumnFamilySummaries(this.conf);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.CacheConfig

    try {
      processTable(fs, tableDir, log, c, majorCompact);
    } finally {
       log.close();
       // TODO: is this still right?
       BlockCache bc = new CacheConfig(c).getBlockCache();
       if (bc != null) bc.shutdown();
    }
  }
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.