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 Summary
FieldsModifier and TypeFieldDescription(package private) static booleanprivate final AEMonitorprivate longprivate int(package private) ArrayList<RateControlledEntity> (package private) static intprivate longprivate intprivate intprivate long(package private) ArrayList<RateControlledEntity> (package private) final intprivate longprivate booleanprivate longprivate final AEThread2private final EventWaiterprivate final ConcurrentLinkedQueue<RateControlledEntity> private long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReadEntity(RateControlledEntity entity) Add the given entity to the controller for read processing.private booleanprivate booleanprivate booleandoRead(RateControlledEntity ready_entity) voidgenerate(IndentWriter writer) intprivate RateControlledEntityprivate RateControlledEntityprivate boolean(package private) voidbooleanremoveReadEntity(RateControlledEntity entity) Remove the given entity from the controller.voidupdateStats(Set types, Map values)
-
Field Details
-
IDLE_SLEEP_TIME
static int IDLE_SLEEP_TIME -
AGGRESIVE_READ
static boolean AGGRESIVE_READ -
partition_id
final int partition_id -
normal_priority_entities
-
high_priority_entities
-
entities_mon
-
next_normal_position
private int next_normal_position -
next_high_position
private int next_high_position -
wait_count
private long wait_count -
non_progress_count
private long non_progress_count -
progress_count
private long progress_count -
process_loop_count
private long process_loop_count -
processing_waiting
private volatile boolean processing_waiting -
to_deactivate
-
read_processor_thread
-
entity_check_count
private long entity_check_count -
last_entity_check_count
private long last_entity_check_count -
read_waiter
-
entity_count
private int entity_count
-
-
Constructor Details
-
ReadController
public ReadController(int _partition_id)
-
-
Method Details
-
generate
- Specified by:
generatein interfaceAEDiagnosticsEvidenceGenerator
-
updateStats
- Specified by:
updateStatsin interfaceCoreStatsProvider
-
readProcessorLoop
void readProcessorLoop() -
hasConnections
private boolean hasConnections() -
doNormalPriorityRead
private boolean doNormalPriorityRead() -
doHighPriorityRead
private boolean doHighPriorityRead() -
doRead
-
getNextReadyNormalPriorityEntity
-
getNextReadyHighPriorityEntity
-
addReadEntity
Add the given entity to the controller for read processing.- Parameters:
entity- to process reads for
-
removeReadEntity
Remove the given entity from the controller.- Parameters:
entity- to remove from read processing
-
getEntityCount
public int getEntityCount()
-