Class DHTNodes


  • class DHTNodes
    extends Object
    All the nodes we know about, stored as a mapping from node ID to a Destination and Port. And a real Kademlia routing table, which stores node IDs only.
    Since:
    0.9.2
    Author:
    zzz
    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • size

        public int size()
        Returns:
        known nodes, not total net size
      • clear

        public void clear()
      • putIfAbsent

        public NodeInfo putIfAbsent​(NodeInfo nInfo)
        Returns:
        the old value if present, else null
      • findClosest

        public List<NodeInfo> findClosest​(SHA1Hash h,
                                          int numWant)
        DHT
        Parameters:
        h - either a InfoHash or a NID
      • getExploreKeys

        public List<NID> getExploreKeys()
        DHT - get random keys to explore
      • renderStatusHTML

        public void renderStatusHTML​(StringBuilder buf)
        Debug info, HTML formatted
        Since:
        0.9.4