Examples of cacheKey()


Examples of com.m3.methodcache.annotation.CacheResult.cacheKey()

        if (annotation != null) {
            if (!isPoolInitialized) {
                initializePool();
            }
            MemcachedClient memcached = pool.getClient();
            String cacheKey = annotation.cacheKey().equals("") ? getCacheKey(invocation, isUsingRawKey()) : annotation.cacheKey();
            Object cachedObject = null;
            try {
                cachedObject = memcached.get(cacheKey);
            } catch (Throwable t) {
                if (log.isDebugEnabled()) {
View Full Code Here

Examples of com.m3.methodcache.annotation.CacheResult.cacheKey()

        if (annotation != null) {
            if (!isPoolInitialized) {
                initializePool();
            }
            MemcachedClient memcached = pool.getClient();
            String cacheKey = annotation.cacheKey().equals("") ? getCacheKey(invocation, isUsingRawKey()) : annotation.cacheKey();
            Object cachedObject = null;
            try {
                cachedObject = memcached.get(cacheKey);
            } catch (Throwable t) {
                if (log.isDebugEnabled()) {
View Full Code Here

Examples of freenet.store.GetPubkey.cacheKey()

      ClientSSKBlock block = encodeBlockSSK(test, random);
      SSKBlock sskBlock = (SSKBlock) block.getBlock();
      store.put(sskBlock, false, false);
      ClientSSK key = block.getClientKey();
      NodeSSK ssk = (NodeSSK) key.getNodeKey();
      pubkeyCache.cacheKey(ssk.getPubKeyHash(), ssk.getPubKey(), false, false, false, false, false);
      SSKBlock verify = store.fetch(ssk, false, false, false, false, null);
      String data = decodeBlockSSK(verify, key);
      assertEquals(test, data);
    }
   
View Full Code Here

Examples of freenet.store.GetPubkey.cacheKey()

      assertTrue(false);
     
    }
   
    ClientSSK key = block1.getClientKey();
    pubkeyCache.cacheKey(sskBlock.getKey().getPubKeyHash(), sskBlock.getKey().getPubKey(), false, false, false, false, false);
    // Check that it's in the cache, *not* the underlying store.
    NodeSSK ssk = (NodeSSK) key.getNodeKey();
    SSKBlock verify = store.fetch(ssk, false, false, false, false, null);
    String data = decodeBlockSSK(verify, key);
    assertEquals(test1, data);
View Full Code Here

Examples of freenet.store.SimpleGetPubkey.cacheKey()

      ClientSSKBlock block = encodeBlockSSK(test, random);
      SSKBlock sskBlock = (SSKBlock) block.getBlock();
      store.put(sskBlock, false, false);
      ClientSSK key = block.getClientKey();
      NodeSSK ssk = (NodeSSK) key.getNodeKey();
      pubkeyCache.cacheKey(ssk.getPubKeyHash(), ssk.getPubKey(), false, false, false, false, false);
      SSKBlock verify = store.fetch(ssk, false, false, false, false, null);
      String data = decodeBlockSSK(verify, key);
      assertEquals(test, data);
    }
   
View Full Code Here

Examples of freenet.store.SimpleGetPubkey.cacheKey()

      assertTrue(false);
     
    }
   
    ClientSSK key = block1.getClientKey();
    pubkeyCache.cacheKey(sskBlock.getKey().getPubKeyHash(), sskBlock.getKey().getPubKey(), false, false, false, false, false);
    // Check that it's in the cache, *not* the underlying store.
    NodeSSK ssk = (NodeSSK) key.getNodeKey();
    SSKBlock verify = store.fetch(ssk, false, false, false, false, null);
    String data = decodeBlockSSK(verify, key);
    assertEquals(test1, data);
View Full Code Here

Examples of loxia.support.cache.annotation.Cacheable.cacheKey()

        value = null;
      logger.debug("Cached value: {} will be returned as type {} with key [{}]", new Object[] { value, m.getReturnType(), cacheKey });
      return value;
    }else{
      value = pjp.proceed(pjp.getArgs());
      cacheValue(methodName, c.cacheKey(), cacheKey, value == null ? NULL : value, c.expire(), params);
      return value;
    }
  }

  private Method getMethod(ProceedingJoinPoint pjp,Class<? extends Annotation> clazz){
View Full Code Here

Examples of org.apache.cassandra.io.sstable.SSTableReader.cacheKey()

        // TODO: this doesn't belong here, it should be part of the reader to load when the tracker is wired up
        for (Map.Entry<SSTableReader, Map<DecoratedKey, RowIndexEntry>> ssTableReaderMapEntry : cachedKeyMap.entrySet())
        {
            SSTableReader key = ssTableReaderMapEntry.getKey();
            for (Map.Entry<DecoratedKey, RowIndexEntry> entry : ssTableReaderMapEntry.getValue().entrySet())
               key.cacheKey(entry.getKey(), entry.getValue());
        }

        long dTime = System.currentTimeMillis() - startTime;
        long startsize = SSTable.getTotalBytes(toCompact);
        long endsize = SSTable.getTotalBytes(sstables);
View Full Code Here

Examples of org.apache.cassandra.io.sstable.SSTableReader.cacheKey()

        // TODO: this doesn't belong here, it should be part of the reader to load when the tracker is wired up
        for (Entry<SSTableReader, Map<DecoratedKey, Long>> ssTableReaderMapEntry : cachedKeyMap.entrySet())
        {
            SSTableReader key = ssTableReaderMapEntry.getKey();
            for (Entry<DecoratedKey, Long> entry : ssTableReaderMapEntry.getValue().entrySet())
               key.cacheKey(entry.getKey(), entry.getValue());
        }

        long dTime = System.currentTimeMillis() - startTime;
        long startsize = SSTable.getTotalBytes(toCompact);
        long endsize = SSTable.getTotalBytes(sstables);
View Full Code Here

Examples of org.apache.cassandra.io.sstable.SSTableReader.cacheKey()

        // TODO: this doesn't belong here, it should be part of the reader to load when the tracker is wired up
        for (Entry<SSTableReader, Map<DecoratedKey, Long>> ssTableReaderMapEntry : cachedKeyMap.entrySet())
        {
            SSTableReader key = ssTableReaderMapEntry.getKey();
            for (Entry<DecoratedKey, Long> entry : ssTableReaderMapEntry.getValue().entrySet())
               key.cacheKey(entry.getKey(), entry.getValue());
        }

        long dTime = System.currentTimeMillis() - startTime;
        long startsize = SSTable.getTotalBytes(toCompact);
        long endsize = SSTable.getTotalBytes(sstables);
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.