HCOLL-134 and HCOLL-145 ( release draft cut of the code so that I can test it across my network )

This commit is contained in:
Rob Austin
2014-09-25 16:42:22 +01:00
parent 96d2fb0ee9
commit 4d889222e3
13 changed files with 693 additions and 30 deletions
@@ -136,9 +136,6 @@ abstract class AbstractChannelReplicator implements Closeable {
throttler.add(channel);
}
interface ChannelReplicatorBuilder {
}
/**
* throttles 'writes' to ensure the network is not swamped, this is achieved by periodically
* de-registering the write selector during periods of high volume.
@@ -211,9 +208,9 @@ abstract class AbstractChannelReplicator implements Closeable {
if (bytesWritten > maxBytesInInterval) {
for (SelectableChannel channel : channels) {
final SelectionKey selectionKey = channel.keyFor(selector);
if (selectionKey != null)
if (selectionKey != null) {
selectionKey.interestOps(selectionKey.interestOps() & ~OP_WRITE);
}
if (LOG.isDebugEnabled())
LOG.debug("Throttling UDP writes");
}