Class SearchState


  • class SearchState
    extends Object
    Data related to a particular search
    • Method Detail

      • getTarget

        public Hash getTarget()
      • getPending

        public Set<Hash> getPending()
      • getAttempted

        public Set<Hash> getAttempted()
      • getClosestAttempted

        public Set<Hash> getClosestAttempted​(int max)
      • wasAttempted

        public boolean wasAttempted​(Hash peer)
      • getSuccessful

        public Set<Hash> getSuccessful()
      • getFailed

        public Set<Hash> getFailed()
      • completed

        public boolean completed()
      • complete

        public void complete()
      • isAborted

        public boolean isAborted()
        Since:
        0.9.16
      • abort

        public void abort()
        Since:
        0.9.16
      • getWhenStarted

        public long getWhenStarted()
      • getWhenCompleted

        public long getWhenCompleted()
      • addPending

        public void addPending​(Hash peer)
      • removePending

        public void removePending​(Hash peer)
        we didn't actually want to add this peer as part of the pending list...
      • dataFound

        public long dataFound​(Hash peer)
        how long did it take to get the reply, or -1 if we don't know
      • replyFound

        public long replyFound​(Hash peer)
        how long did it take to get the reply, or -1 if we dont know
      • getRepliedPeers

        public Set<Hash> getRepliedPeers()
      • replyTimeout

        public void replyTimeout​(Hash peer)