use of com.hazelcast.internal.networking.nonblocking.NonBlockingSocketWriter in project hazelcast by hazelcast.
the class IOBalancerStressTest method debug.
public String debug(TcpIpConnectionManager connectionManager) {
NonBlockingIOThreadingModel threadingModel = (NonBlockingIOThreadingModel) connectionManager.getIoThreadingModel();
StringBuffer sb = new StringBuffer();
sb.append("in selectors\n");
for (NonBlockingIOThread in : threadingModel.getInputThreads()) {
sb.append(in + ": " + in.getEventCount() + "\n");
for (TcpIpConnection connection : connectionManager.getActiveConnections()) {
NonBlockingSocketReader socketReader = (NonBlockingSocketReader) connection.getSocketReader();
if (socketReader.getOwner() == in) {
sb.append("\t" + socketReader + " eventCount:" + socketReader.getEventCount() + "\n");
}
}
}
sb.append("out selectors\n");
for (NonBlockingIOThread in : threadingModel.getOutputThreads()) {
sb.append(in + ": " + in.getEventCount() + "\n");
for (TcpIpConnection connection : connectionManager.getActiveConnections()) {
NonBlockingSocketWriter socketWriter = (NonBlockingSocketWriter) connection.getSocketWriter();
if (socketWriter.getOwner() == in) {
sb.append("\t" + socketWriter + " eventCount:" + socketWriter.getEventCount() + "\n");
}
}
}
return sb.toString();
}
Aggregations