public class Reader extends Object
adjustThreads().| Constructor and Description |
|---|
Reader(RouterContext ctx)Reader thread pool for the given context. |
| Modifier and Type | Method and Description |
|---|---|
void | adjustThreads()Dynamically adjust thread count to match the target. |
void | connectionClosed(NTCPConnection con)Removes a closed connection from the queues. |
int | getActiveCount()Number of threads currently processing (not parked). |
static int | getThreadCount()Reader thread count. |
double | getUtilization()Reader pool utilization as a ratio (0.0-1.0). |
static void | setThreadCount(int count)Reader thread count, bounded by MIN_THREADS-MAX_THREADS |
void | startReading(int numReaders)Starts the given number of reader threads. |
void | stopReading()Stop all reader threads. |
void | wantsRead(NTCPConnection con)Registers a connection to be read. |
public Reader(RouterContext ctx)
public void adjustThreads()
public void connectionClosed(NTCPConnection con)
public int getActiveCount()
public static int getThreadCount()
public double getUtilization()
public static void setThreadCount(int count)
public void startReading(int numReaders)
public void stopReading()
public void wantsRead(NTCPConnection con)