Class StoreState


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

      • getTarget

        public Hash getTarget()
      • getPending

        public Set<Hash> getPending()
      • getAttempted

        public Set<Hash> getAttempted()
      • getSuccessful

        public Set<Hash> getSuccessful()
      • getFailed

        public Set<Hash> getFailed()
        getFailed
      • 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)
      • 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)
        public long confirmedExploratory(Hash peer) { long rv = -1; synchronized (_pendingPeers) { _pendingPeers.remove(peer); Long when = _pendingPeerTimes.remove(peer); if (when != null) rv = _context.clock().now() - when.longValue(); } synchronized (_successfulExploratoryPeers) { _successfulExploratoryPeers.add(peer); } return rv; }