WriteBuffer -> WriteRequestQueue

This commit is contained in:
Trustin Lee 2010-02-19 01:41:32 +00:00
parent 4be652ad04
commit 2f601dcbaf
2 changed files with 10 additions and 10 deletions

View File

@ -74,7 +74,7 @@ class NioDatagramChannel extends AbstractChannel
final Object interestOpsLock = new Object(); final Object interestOpsLock = new Object();
/** /**
* Monitor object for synchronizing access to the {@link WriteBufferQueue}. * Monitor object for synchronizing access to the {@link WriteRequestQueue}.
*/ */
final Object writeLock = new Object(); final Object writeLock = new Object();
@ -91,10 +91,10 @@ class NioDatagramChannel extends AbstractChannel
/** /**
* Queue of write {@link MessageEvent}s. * Queue of write {@link MessageEvent}s.
*/ */
final Queue<MessageEvent> writeBufferQueue = new WriteBufferQueue(); final Queue<MessageEvent> writeBufferQueue = new WriteRequestQueue();
/** /**
* Keeps track of the number of bytes that the {@link WriteBufferQueue} currently * Keeps track of the number of bytes that the {@link WriteRequestQueue} currently
* contains. * contains.
*/ */
final AtomicInteger writeBufferSize = new AtomicInteger(); final AtomicInteger writeBufferSize = new AtomicInteger();
@ -238,17 +238,17 @@ class NioDatagramChannel extends AbstractChannel
} }
/** /**
* WriteBuffer is an extension of {@link LinkedTransferQueue} that adds * {@link WriteRequestQueue} is an extension of {@link LinkedTransferQueue}
* support for highWaterMark checking of the write buffer size. * that adds support for highWaterMark checking of the write buffer size.
*/ */
private final class WriteBufferQueue extends private final class WriteRequestQueue extends
LinkedTransferQueue<MessageEvent> { LinkedTransferQueue<MessageEvent> {
private static final long serialVersionUID = 5057413071460766376L; private static final long serialVersionUID = 5057413071460766376L;
private final ThreadLocalBoolean notifying = new ThreadLocalBoolean(); private final ThreadLocalBoolean notifying = new ThreadLocalBoolean();
WriteBufferQueue() { WriteRequestQueue() {
super(); super();
} }

View File

@ -64,7 +64,7 @@ class NioSocketChannel extends AbstractChannel
final Runnable writeTask = new WriteTask(); final Runnable writeTask = new WriteTask();
final AtomicBoolean writeTaskInTaskQueue = new AtomicBoolean(); final AtomicBoolean writeTaskInTaskQueue = new AtomicBoolean();
final Queue<MessageEvent> writeBuffer = new WriteBuffer(); final Queue<MessageEvent> writeBuffer = new WriteRequestQueue();
final AtomicInteger writeBufferSize = new AtomicInteger(); final AtomicInteger writeBufferSize = new AtomicInteger();
final AtomicInteger highWaterMarkCounter = new AtomicInteger(); final AtomicInteger highWaterMarkCounter = new AtomicInteger();
boolean inWriteNowLoop; boolean inWriteNowLoop;
@ -194,13 +194,13 @@ class NioSocketChannel extends AbstractChannel
} }
} }
private final class WriteBuffer extends LinkedTransferQueue<MessageEvent> { private final class WriteRequestQueue extends LinkedTransferQueue<MessageEvent> {
private static final long serialVersionUID = -246694024103520626L; private static final long serialVersionUID = -246694024103520626L;
private final ThreadLocalBoolean notifying = new ThreadLocalBoolean(); private final ThreadLocalBoolean notifying = new ThreadLocalBoolean();
WriteBuffer() { WriteRequestQueue() {
super(); super();
} }