Examples of peerID()


Examples of net.tomp2p.peers.PeerAddress.peerId()

        if (!isReplication()) {
            return;
        }
        if (!nRootReplication) {
            PeerAddress closest = closest(locationKey);
            if (closest.peerId().equals(selfAddress.peerId())) {
                if (backend.updateResponsibilities(locationKey, closest.peerId())) {
                    // I am responsible for this content
                    notifyMeResponsible(locationKey);
                }
            } else {
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

            return;
        }
        if (!nRootReplication) {
            PeerAddress closest = closest(locationKey);
            if (closest.peerId().equals(selfAddress.peerId())) {
                if (backend.updateResponsibilities(locationKey, closest.peerId())) {
                    // I am responsible for this content
                    notifyMeResponsible(locationKey);
                }
            } else {
                if (backend.updateResponsibilities(locationKey, closest.peerId())) {
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

                if (backend.updateResponsibilities(locationKey, closest.peerId())) {
                    // I am responsible for this content
                    notifyMeResponsible(locationKey);
                }
            } else {
                if (backend.updateResponsibilities(locationKey, closest.peerId())) {
                    // notify that someone else is now responsible for the
                    // content with key responsibleLocations
                    notifyOtherResponsible(locationKey, closest);
                }
            }
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

       
        for (final Number160 myResponsibleLocation : myResponsibleLocations) {
      if (!nRootReplication) {
        // use 0-root replication strategy
        PeerAddress closest = closest(myResponsibleLocation);
        if (!closest.peerId().equals(selfAddress.peerId())) {
          if (isInReplicationRange(myResponsibleLocation, selfAddress, replicationFactor)) {
              if (backend.updateResponsibilities(myResponsibleLocation, closest.peerId())) {
                LOG.debug("I {} didn't know that {} is responsible for {}.", selfAddress, closest,
                    myResponsibleLocation);
                // notify that someone else is now responsible for the
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

      if (!nRootReplication) {
        // use 0-root replication strategy
        PeerAddress closest = closest(myResponsibleLocation);
        if (!closest.peerId().equals(selfAddress.peerId())) {
          if (isInReplicationRange(myResponsibleLocation, selfAddress, replicationFactor)) {
              if (backend.updateResponsibilities(myResponsibleLocation, closest.peerId())) {
                LOG.debug("I {} didn't know that {} is responsible for {}.", selfAddress, closest,
                    myResponsibleLocation);
                // notify that someone else is now responsible for the
                // content with key responsibleLocations
                notifyOtherResponsible(myResponsibleLocation, closest);
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

    if (!nRootReplication) {
      // check if we are now responsible for content where the other peer
      // was responsible
      for (Number160 otherResponsibleLocation : otherResponsibleLocations) {
        PeerAddress closest = closest(otherResponsibleLocation);
        if (closest.peerId().equals(selfAddress.peerId())) {
          if (backend.updateResponsibilities(otherResponsibleLocation,
              closest.peerId())) {
            LOG.debug("I {} am responsible for {} after leaving of {}.", selfAddress,
                otherResponsibleLocations, peerAddress);
            notifyMeResponsible(otherResponsibleLocation);
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

      // was responsible
      for (Number160 otherResponsibleLocation : otherResponsibleLocations) {
        PeerAddress closest = closest(otherResponsibleLocation);
        if (closest.peerId().equals(selfAddress.peerId())) {
          if (backend.updateResponsibilities(otherResponsibleLocation,
              closest.peerId())) {
            LOG.debug("I {} am responsible for {} after leaving of {}.", selfAddress,
                otherResponsibleLocations, peerAddress);
            notifyMeResponsible(otherResponsibleLocation);
            // we don't need to check this again, so remove it from
            // the list if present
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

            LOG.debug("I {} already know that I'm responsible for {} after leaving of {}.",
                selfAddress, otherResponsibleLocations, peerAddress);
          }
        } else {
          if (backend.updateResponsibilities(otherResponsibleLocation,
              closest.peerId())) {
            LOG.debug("We should check if the closer peer has the content");
            notifyOtherResponsible(otherResponsibleLocation, closest);
            // we don't need to check this again, so remove it from
            // the list if present
            myResponsibleLocations.remove(otherResponsibleLocation);
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

            System.out.println("closest so far: " + queried.first());
            PeerAddress next = pa1.pollFirst();
            while (queried.contains(next)) {
                next = pa1.pollFirst();
            }
            result = next.peerId();
            start = findNr(next.peerId().toString(), peers);
        }
    }

    public static void findInMap(PeerAddress key, Peer[] peers) {
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

            PeerAddress next = pa1.pollFirst();
            while (queried.contains(next)) {
                next = pa1.pollFirst();
            }
            result = next.peerId();
            start = findNr(next.peerId().toString(), peers);
        }
    }

    public static void findInMap(PeerAddress key, Peer[] peers) {
        for (int i = 0; i < peers.length; i++) {
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.