Class TrackerChecker

java.lang.Object
com.biglybt.core.tracker.client.impl.bt.TrackerChecker
All Implemented Interfaces:
AEDiagnosticsEvidenceGenerator, SystemTime.ChangeListener, TimerEventPerformer

  • Field Details

    • LOGID

      private static final LogIDs LOGID
    • tracker_timer

      private static final Timer tracker_timer
    • trackers

      private final HashMap trackers
      List of Trackers. key = Tracker URL string value = TrackerStatus object
    • trackers_mon

      private final AEMonitor trackers_mon
    • scraper

      private final TRTrackerBTScraperImpl scraper
      TRTrackerScraperImpl object associated with this object.
    • nextScrapeCheckOn

      private long nextScrapeCheckOn
    • oldResponse

      Loop indefinitely, waiting for the next scrape, and scraping.
  • Constructor Details

  • Method Details

    • getHashData

      protected TRTrackerScraperResponseImpl getHashData(TRTrackerAnnouncer tracker_client)
      Retrieves the last cached Scraper Response based on a TRTrackerClient's current URL (announce-list entry or announce) and its torrent's hash.
      Returns:
      The cached scrape response. Can be null.
    • getHashData

      protected TRTrackerScraperResponseImpl getHashData(TOTorrent torrent, URL target_url)
      Retrieves the last cached Scraper Response based on a TOTorrent's Announce URL (not announce-list) and hash.
      Returns:
      The cached scrape response. Can be null.
    • getHashData

      protected TRTrackerScraperResponseImpl getHashData(URL trackerUrl, HashWrapper hash)
      Retrieves the last cached Scraper Response for the supplied tracker URL and hash. If no cache has exists for the hash, one is created.
      Returns:
      The cached scrape response. Can be null.
    • peekHashData

      protected TRTrackerScraperResponseImpl peekHashData(TOTorrent torrent, URL target_url)
    • removeHash

      protected void removeHash(TOTorrent torrent)
      Removes the scrape task and data associated with the TOTorrent's Announce URL, announce-list data and hash.
    • removeHash

      protected void removeHash(String trackerUrl, HashWrapper hash)
      Removes the scrape task and data associated with the supplied tracker URL and torrent hash.
    • syncUpdate

      protected void syncUpdate(TOTorrent torrent, URL target_url)
    • perform

      public void perform(TimerEvent event)
      Specified by:
      perform in interface TimerEventPerformer
    • runScrapes

      private void runScrapes()
    • checkForNextScrape

      private TRTrackerBTScraperResponseImpl checkForNextScrape()
      Finds the torrent that will be needing a scrape next.
    • clockChangeDetected

      public void clockChangeDetected(long current_time, long offset)
      Description copied from interface: SystemTime.ChangeListener
      Called before the change becomes visible to getCurrentTime callers
      Specified by:
      clockChangeDetected in interface SystemTime.ChangeListener
      Parameters:
      current_time -
      offset -
    • clockChangeCompleted

      public void clockChangeCompleted(long current_time, long offset)
      Description copied from interface: SystemTime.ChangeListener
      Called after the change is visible to getCurrentTime callers
      Specified by:
      clockChangeCompleted in interface SystemTime.ChangeListener
      Parameters:
      current_time -
      offset -
    • generate

      public void generate(IndentWriter writer)
      Specified by:
      generate in interface AEDiagnosticsEvidenceGenerator
    • getNextScrapeCheckOn

      public long getNextScrapeCheckOn()