Class StoreState


  • class StoreState
    extends Object
    Tracks the state of a StoreJob
    • Method Detail

      • getTarget

        public Hash getTarget()
      • getPendingCount

        public int getPendingCount()
        The number of peers pending.
        Since:
        0.9.53 replaces getPending()
      • getAttempted

        public Set<Hash> getAttempted()
        The peers attempted OR skipped. DOES include skipped peers. Use getAttemptedCount for the number of attempts.
      • getAttemptedCount

        public int getAttemptedCount()
        The number of peers attempted. Does not include skipped peers. Do not use getAttempted().size() as that does include skipped peers.
        Since:
        0.9.53
      • getSuccessful

        public Hash getSuccessful()
        Return a successful peer (a random one if more than one was successful) or null.
        Since:
        0.9.53 formerly returned a copy of the Set
      • completed

        public boolean completed()
      • complete

        public void complete​(boolean completed)
      • getCompleteCount

        public int getCompleteCount()
      • getWhenStarted

        public long getWhenStarted()
      • getWhenCompleted

        public long getWhenCompleted()
      • addPending

        public void addPending​(Hash peer)
        Increments attempted count
      • addSkipped

        public void addSkipped​(Hash peer)
        we aren't even going to try to contact this peer
      • confirmed

        public long confirmed​(Hash peer)
      • replyTimeout

        public void replyTimeout​(Hash peer)