use of com.hazelcast.internal.networking.nio.NioOutboundPipeline in project hazelcast by hazelcast.
the class OverloadedConnectionsPlugin method getOutboundQueue.
private Queue<OutboundFrame> getOutboundQueue(TcpServerConnection connection, boolean priority) {
if (connection.getChannel() instanceof NioChannel) {
NioChannel nioChannel = (NioChannel) connection.getChannel();
NioOutboundPipeline outboundPipeline = nioChannel.outboundPipeline();
return priority ? outboundPipeline.priorityWriteQueue : outboundPipeline.writeQueue;
} else {
return EMPTY_QUEUE;
}
}
use of com.hazelcast.internal.networking.nio.NioOutboundPipeline in project hazelcast by hazelcast.
the class IOBalancerStressTest method debug.
private StringBuilder debug(HazelcastInstance hz) {
TcpServer networkingService = (TcpServer) getNode(hz).getServer();
NioNetworking networking = (NioNetworking) networkingService.getNetworking();
ServerConnectionManager cm = getNode(hz).getServer().getConnectionManager(EndpointQualifier.MEMBER);
StringBuilder sb = new StringBuilder();
sb.append("in owners\n");
for (NioThread in : networking.getInputThreads()) {
sb.append(in).append(": ").append(in.getEventCount()).append("\n");
for (ServerConnection connection : cm.getConnections()) {
TcpServerConnection tcpConnection = (TcpServerConnection) connection;
NioInboundPipeline inboundPipeline = ((NioChannel) tcpConnection.getChannel()).inboundPipeline();
if (inboundPipeline.owner() == in) {
sb.append("\t").append(inboundPipeline).append(" load: ").append(inboundPipeline.load()).append("\n");
}
}
}
sb.append("out owners\n");
for (NioThread in : networking.getOutputThreads()) {
sb.append(in).append(": ").append(in.getEventCount()).append("\n");
for (ServerConnection connection : cm.getConnections()) {
TcpServerConnection tcpConnection = (TcpServerConnection) connection;
NioOutboundPipeline outboundPipeline = ((NioChannel) tcpConnection.getChannel()).outboundPipeline();
if (outboundPipeline.owner() == in) {
sb.append("\t").append(outboundPipeline).append(" load:").append(outboundPipeline.load()).append("\n");
}
}
}
return sb;
}
Aggregations