Package net.tomp2p.rpc

Examples of net.tomp2p.rpc.DigestInfo


                    Collection<PeerAddress> newNeighbors = lastResponse.neighborsSet(0).neighbors();

                    Integer resultSize = lastResponse.intAt(0);
                    Number160 keyDigest = lastResponse.key(0);
                    Number160 contentDigest = lastResponse.key(1);
                    DigestInfo digestBean = new DigestInfo(keyDigest, contentDigest, resultSize == null ? 0
                            : resultSize);
                    LOG.debug("Peer ({}) {} reported {} in message {}", (digestBean.size() > 0 ? "direct" : "none"),
                            remotePeer, newNeighbors, lastResponse);
                    finished = routingMechanism.evaluateSuccess(remotePeer, digestBean, newNeighbors, last, routingBuilder.locationKey());
                    LOG.debug("Routing finished {} / {}", finished,
                            routingMechanism.isStopCreatingNewFutures());
                } else {
View Full Code Here


    store = storage.put(key2, data2, null, true, false);
    Assert.assertEquals(PutStatus.OK, store);
    Collection<Number640> number640 = new ArrayList<Number640>(2);
    number640.add(key1);
    number640.add(key2);
    DigestInfo digest = storage.digest(number640);
    Assert.assertEquals(1, digest.size());
    Assert.assertEquals(key1, digest.digests().firstEntry().getKey());
  }
View Full Code Here

    Data data2 = new Data("test2").prepareFlag();
    Enum<?> store = storage.put(key1, data1, null, true, false);
    Assert.assertEquals(PutStatus.OK, store);
    store = storage.put(key2, data2, null, true, false);
    Assert.assertEquals(PutStatus.OK, store);
    DigestInfo digest = storage.digest(new Number640(locationKey, domainKey, content1,
        Number160.ZERO), new Number640(locationKey, domainKey, content1, Number160.MAX_VALUE), -1,
        true);
    Assert.assertEquals(1, digest.size());
    Assert.assertEquals(key1, digest.digests().firstEntry().getKey());
  }
View Full Code Here

TOP

Related Classes of net.tomp2p.rpc.DigestInfo

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.