public class Writer extends Object
adjustThreads().| Constructor and Description |
|---|
Writer(RouterContext ctx)Writer. |
| Modifier and Type | Method and Description |
|---|---|
void | adjustThreads()Dynamically adjust thread count to match the target. |
void | connectionClosed(NTCPConnection con)connectionClosed. |
int | getActiveCount()Get the number of threads currently processing (not parked). |
static int | getThreadCount()Get the writer thread count |
double | getUtilization()Get writer pool utilization as a ratio (0.0-1.0). |
static void | setThreadCount(int count)Set the writer thread count, bounded by MIN_THREADS-MAX_THREADS |
void | startWriting(int numWriters)startWriting. |
void | stopWriting()stopWriting. |
void | wantsWrite(NTCPConnection con,
String source)wantsWrite. |
public Writer(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 startWriting(int numWriters)
public void stopWriting()
public void wantsWrite(NTCPConnection con, String source)