Class ReadController

java.lang.Object
com.biglybt.core.networkmanager.impl.ReadController
All Implemented Interfaces:
CoreStatsProvider, AEDiagnosticsEvidenceGenerator

public class ReadController extends Object implements CoreStatsProvider, AEDiagnosticsEvidenceGenerator
Processes reads of read-entities and handles the read selector.
  • Field Details

    • IDLE_SLEEP_TIME

      static int IDLE_SLEEP_TIME
    • AGGRESIVE_READ

      static boolean AGGRESIVE_READ
    • normal_priority_entities

      volatile ArrayList<RateControlledEntity> normal_priority_entities
    • high_priority_entities

      volatile ArrayList<RateControlledEntity> high_priority_entities
    • entities_mon

      private final AEMonitor entities_mon
    • next_normal_position

      private int next_normal_position
    • next_high_position

      private int next_high_position
    • loop_count

      private long loop_count
    • wait_count

      private long wait_count
    • non_progress_count

      private long non_progress_count
    • progress_count

      private long progress_count
    • entity_check_count

      private long entity_check_count
    • last_entity_check_count

      private long last_entity_check_count
    • read_waiter

      private final EventWaiter read_waiter
    • entity_count

      private int entity_count
  • Constructor Details

    • ReadController

      public ReadController()
  • Method Details

    • generate

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

      public void updateStats(Set types, Map values)
      Specified by:
      updateStats in interface CoreStatsProvider
    • readProcessorLoop

      void readProcessorLoop()
    • hasConnections

      private boolean hasConnections()
    • doNormalPriorityRead

      private boolean doNormalPriorityRead()
    • doHighPriorityRead

      private boolean doHighPriorityRead()
    • doRead

      private boolean doRead(RateControlledEntity ready_entity)
    • getNextReadyNormalPriorityEntity

      private RateControlledEntity getNextReadyNormalPriorityEntity()
    • getNextReadyHighPriorityEntity

      private RateControlledEntity getNextReadyHighPriorityEntity()
    • addReadEntity

      public void addReadEntity(RateControlledEntity entity)
      Add the given entity to the controller for read processing.
      Parameters:
      entity - to process reads for
    • removeReadEntity

      public boolean removeReadEntity(RateControlledEntity entity)
      Remove the given entity from the controller.
      Parameters:
      entity - to remove from read processing
    • getEntityCount

      public int getEntityCount()