Package net.tomp2p.message

Examples of net.tomp2p.message.KeyCollection.keys()


        final boolean isCollection = keys != null && returnNr == null;
              
        if (isCollection) {
          if(sendBackResults) {
            result1 = new HashMap<Number640, Data>(keys.size());
            for (Number640 key : keys.keys()) {
                    Pair<Data,Enum<?>> data = storageLayer.remove(key, publicKey, sendBackResults);
                    notifyRemoveResponsibility(key.locationKey(), data.element1());
                    if(data.element0() != null) {
                      result1.put(key, data.element0());
                    }
View Full Code Here


                      result1.put(key, data.element0());
                    }
                }
          } else {
            result2 = new HashMap<Number640, Byte>(keys.size());
            for (Number640 key : keys.keys()) {
                    Pair<Data,Enum<?>> data = storageLayer.remove(key, publicKey, sendBackResults);
                    notifyRemoveResponsibility(key.locationKey(), data.element1());
                    result2.put(key, (byte) data.element1().ordinal());
                }
          }
View Full Code Here

                    result2.put(key, (byte) data.element1().ordinal());
                }
          }
           
        } else if(isRange) {
            Iterator<Number640> iterator = keys.keys().iterator();
            Number640 from = iterator.next();
            Number640 to = iterator.next();
            if(sendBackResults) {
              result1 = storageLayer.removeReturnData(from, to, publicKey);
            } else {
View Full Code Here

                    digestInfo = peerBean().digestStorage().digest(from, to, -1, true);
                } else if ((keyBloomFilter != null || contentBloomFilter != null&& locationKey!=null && domainKey!=null) {
                  Number320 locationAndDomainKey = new Number320(locationKey, domainKey);
                    digestInfo = peerBean().digestStorage().digest(locationAndDomainKey, keyBloomFilter,
                            contentBloomFilter, -1, true, true);
                } else if (keyCollection!=null && keyCollection.keys().size() == 2) {
                  Iterator<Number640> iterator = keyCollection.keys().iterator();
                  Number640 from = iterator.next();
                  Number640 to = iterator.next();
                  digestInfo = peerBean().digestStorage().digest(from, to, -1, true);
                } else if (locationKey!=null && domainKey!=null){
View Full Code Here

                } else if ((keyBloomFilter != null || contentBloomFilter != null&& locationKey!=null && domainKey!=null) {
                  Number320 locationAndDomainKey = new Number320(locationKey, domainKey);
                    digestInfo = peerBean().digestStorage().digest(locationAndDomainKey, keyBloomFilter,
                            contentBloomFilter, -1, true, true);
                } else if (keyCollection!=null && keyCollection.keys().size() == 2) {
                  Iterator<Number640> iterator = keyCollection.keys().iterator();
                  Number640 from = iterator.next();
                  Number640 to = iterator.next();
                  digestInfo = peerBean().digestStorage().digest(from, to, -1, true);
                } else if (locationKey!=null && domainKey!=null){
                  Number320 locationAndDomainKey = new Number320(locationKey, domainKey);
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.