Package freenet.store

Examples of freenet.store.CHKStore.fetch()


      nodeStats.avgRequestLocation.report(loc);
      CHKBlock block = chkDatastore.fetch(key, dontPromote || !canWriteDatastore, ignoreOldBlocks, meta);
      if(block == null) {
        CHKStore store = oldCHK;
        if(store != null)
          block = store.fetch(key, dontPromote || !canWriteDatastore, ignoreOldBlocks, meta);
      }
      if (block != null) {
        nodeStats.avgStoreCHKSuccess.report(loc);
        if (dist > nodeStats.furthestStoreCHKSuccess)
          nodeStats.furthestStoreCHKSuccess=dist;
View Full Code Here


      }
      block=chkDatacache.fetch(key, dontPromote || !canWriteDatastore, ignoreOldBlocks, meta);
      if(block == null) {
        CHKStore store = oldCHKCache;
        if(store != null)
          block = store.fetch(key, dontPromote || !canWriteDatastore, ignoreOldBlocks, meta);
      }
      if (block != null) {
        nodeStats.avgCacheCHKSuccess.report(loc);
        if (dist > nodeStats.furthestCacheCHKSuccess)
          nodeStats.furthestCacheCHKSuccess=dist;
View Full Code Here

    for(int i=0;i<5;i++) {
      String test = "test" + i;
      ClientCHKBlock block = encodeBlockCHK(test);
      store.put(block.getBlock(), false);
      ClientCHK key = block.getClientKey();
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    saltStore.close();
View Full Code Here

      byte[] routingKey = key.getRoutingKey();
      if(saltStore.probablyInStore(routingKey))
        falsePositives++;
      store.put(block.getBlock(), false);
      assertTrue(saltStore.probablyInStore(routingKey));
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    assertTrue(falsePositives <= acceptableFalsePositives);
View Full Code Here

      String test = "test" + i;
      ClientCHKBlock block = encodeBlockCHK(test);
      ClientCHK key = block.getClientKey();
      byte[] routingKey = key.getRoutingKey();
      assertTrue(saltStore.probablyInStore(routingKey));
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    saltStore.close();
View Full Code Here

      byte[] routingKey = key.getRoutingKey();
      if(saltStore.probablyInStore(routingKey))
        falsePositives++;
      store.put(block.getBlock(), false);
      assertTrue(saltStore.probablyInStore(routingKey));
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    assertTrue(falsePositives <= ACCEPTABLE_FALSE_POSITIVES);
View Full Code Here

      String test = "test" + i;
      ClientCHKBlock block = encodeBlockCHK(test);
      ClientCHK key = block.getClientKey();
      byte[] routingKey = key.getRoutingKey();
      assertTrue(saltStore.probablyInStore(routingKey));
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    saltStore.close();
View Full Code Here

      byte[] routingKey = key.getRoutingKey();
      if(saltStore.probablyInStore(routingKey))
        falsePositives++;
      store.put(block.getBlock(), false);
      assertTrue(saltStore.probablyInStore(routingKey));
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    assertTrue(falsePositives <= ACCEPTABLE_FALSE_POSITIVES);
View Full Code Here

      String test = "test" + i;
      ClientCHKBlock block = encodeBlockCHK(test);
      ClientCHK key = block.getClientKey();
      byte[] routingKey = key.getRoutingKey();
      assertTrue(saltStore.probablyInStore(routingKey));
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    saltStore.close();
View Full Code Here

      byte[] routingKey = key.getRoutingKey();
      if(saltStore.probablyInStore(routingKey))
        falsePositives++;
      store.put(block.getBlock(), false);
      assertTrue(saltStore.probablyInStore(routingKey));
      CHKBlock verify = store.fetch(key.getNodeCHK(), false, false, null);
      String data = decodeBlockCHK(verify, key);
      assertEquals(test, data);
    }
   
    assertTrue(falsePositives == TEST_COUNT);
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.