Package net.tomp2p.message

Examples of net.tomp2p.message.DataMap


        final boolean isRange = contentKeys != null && returnNr != null;
        final boolean isCollection = contentKeys != null && returnNr == null;
        final boolean isBloomFilterAnd = isBloomFilterAnd(message);
        final Map<Number640, Data> result = doGet(locationKey, domainKey, contentKeys, contentBloomFilter,
                versionBloomFilter, limit, ascending, isRange, isCollection, isBloomFilterAnd);
        responseMessage.setDataMap(new DataMap(result));
        return responseMessage;
    }
View Full Code Here


    final Number160 domainKey = message.key(1);
    final Number160 contentKey = message.key(2);

    Number640 key = new Number640(locationKey, domainKey, contentKey, Number160.ZERO);
    final Map<Number640, Data> result = storageLayer.getLatestVersion(key);
    responseMessage.setDataMap(new DataMap(result));

    if (withDigest) {
      final DigestInfo digestInfo = storageLayer.digest(key.minVersionKey(), key.maxVersionKey(), -1, true);
      responseMessage.keyMap640Keys(new KeyMap640Keys(digestInfo.digests()));
    }
View Full Code Here

        final boolean isReturnBloomfilter = message.command() == RPC.Commands.DIGEST_BLOOMFILTER.getNr();
        final boolean isReturnMetaValues = message.command() == RPC.Commands.DIGEST_META_VALUES.getNr();
        if(isReturnMetaValues) {
          final Map<Number640, Data> result = doGet(locationKey, domainKey, contentKeys, contentBloomFilter,
                    versionBloomFilter, limit, ascending, isRange, isCollection, isBloomFilterAnd);
          DataMap dataMap = new DataMap(result, true);
          responseMessage.setDataMap(dataMap);
        } else {
          final DigestInfo digestInfo = doDigest(locationKey, domainKey, contentKeys, contentBloomFilter,
              versionBloomFilter, limit, ascending, isRange, isCollection, isBloomFilterAnd);
          if (isReturnBloomfilter) {
View Full Code Here

          for(Map.Entry<Number640, Data> entry:result1.entrySet()) {
            notifyRemoveResponsibility(entry.getKey().locationKey(), PutStatus.OK);
          }
          // make a copy, so the iterator in the codec wont conflict with
            // concurrent calls
            responseMessage.setDataMap(new DataMap(result1));
        }
        return responseMessage;
    }
View Full Code Here

  }
 
  @Override
    public FutureDone<SyncStat> sendDirect(PeerAddress other, Number160 locationKey, Map<Number640, Data> dataMap) {
        FutureDone<SyncStat> future = synchronize(other)
                .dataMap(new DataMap(dataMap)).start();
        peer.peer().notifyAutomaticFutures(future);
        return future;
    }
View Full Code Here

            // not set, decide based on the data
            if (dataMap == null) {
                udp(true);
            } else {
                udp(false);
                message.setDataMap(new DataMap(dataMap));
            }
        }
       
        message.key(messageKey);
        message.intValue(0);
View Full Code Here

            final ChannelCreator channelCreator, final ConnectionConfiguration configuration) {
        final Message message = createMessage(remotePeer, RPC.Commands.BROADCAST.getNr(), Type.REQUEST_FF_1);
        message.intValue(broadcastBuilder.hopCounter());
        message.key(broadcastBuilder.messageKey());
        if (broadcastBuilder.dataMap() != null) {
            message.setDataMap(new DataMap(broadcastBuilder.dataMap()));
        }
        final FutureResponse futureResponse = new FutureResponse(message);
        final RequestHandler<FutureResponse> requestHandler = new RequestHandler<FutureResponse>(
                futureResponse, peerBean(), connectionBean(), configuration);
        if (!broadcastBuilder.isUDP()) {
View Full Code Here

TOP

Related Classes of net.tomp2p.message.DataMap

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.