You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2008/05/23 02:37:43 UTC
svn commit: r659339 -
/mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java
Author: trustin
Date: Thu May 22 17:37:43 2008
New Revision: 659339
URL: http://svn.apache.org/viewvc?rev=659339&view=rev
Log:
Added 'addXXX' methods for primitive types
Modified:
mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java
Modified: mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java
URL: http://svn.apache.org/viewvc/mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java?rev=659339&r1=659338&r2=659339&view=diff
==============================================================================
--- mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java (original)
+++ mina/branches/buffer/core/src/main/java/org/apache/mina/queue/ByteBufferQueue.java Thu May 22 17:37:43 2008
@@ -52,6 +52,84 @@
* first. Otherwise, the value will be put into the last (i.e. tail)
* {@link ByteBuffer}.
*
+ * @throws IllegalStateException if the element cannot be inserted
+ * due to capacity restriction or an
+ * {@link IoQueueListener#accept(IoQueue, Object)}
+ * which returned <tt>false</tt>
+ */
+ void addByte(byte value);
+
+ /**
+ * Inserts the specified <tt>short</tt> value to the tail of this queue.
+ * If there's not enough room, a new {@link ByteBuffer} will be inserted
+ * first. Otherwise, the value will be put into the last (i.e. tail)
+ * {@link ByteBuffer}.
+ *
+ * @throws IllegalStateException if the element cannot be inserted
+ * due to capacity restriction or an
+ * {@link IoQueueListener#accept(IoQueue, Object)}
+ * which returned <tt>false</tt>
+ */
+ void addShort(short value);
+
+ /**
+ * Inserts the specified <tt>int</tt> value to the tail of this queue.
+ * If there's not enough room, a new {@link ByteBuffer} will be inserted
+ * first. Otherwise, the value will be put into the last (i.e. tail)
+ * {@link ByteBuffer}.
+ *
+ * @throws IllegalStateException if the element cannot be inserted
+ * due to capacity restriction or an
+ * {@link IoQueueListener#accept(IoQueue, Object)}
+ * which returned <tt>false</tt>
+ */
+ void addInt(int value);
+
+ /**
+ * Inserts the specified <tt>long</tt> value to the tail of this queue.
+ * If there's not enough room, a new {@link ByteBuffer} will be inserted
+ * first. Otherwise, the value will be put into the last (i.e. tail)
+ * {@link ByteBuffer}.
+ *
+ * @throws IllegalStateException if the element cannot be inserted
+ * due to capacity restriction or an
+ * {@link IoQueueListener#accept(IoQueue, Object)}
+ * which returned <tt>false</tt>
+ */
+ void addLong(long value);
+
+ /**
+ * Inserts the specified <tt>float</tt> value to the tail of this queue.
+ * If there's not enough room, a new {@link ByteBuffer} will be inserted
+ * first. Otherwise, the value will be put into the last (i.e. tail)
+ * {@link ByteBuffer}.
+ *
+ * @throws IllegalStateException if the element cannot be inserted
+ * due to capacity restriction or an
+ * {@link IoQueueListener#accept(IoQueue, Object)}
+ * which returned <tt>false</tt>
+ */
+ void addFloat(float value);
+
+ /**
+ * Inserts the specified <tt>double</tt> value to the tail of this queue.
+ * If there's not enough room, a new {@link ByteBuffer} will be inserted
+ * first. Otherwise, the value will be put into the last (i.e. tail)
+ * {@link ByteBuffer}.
+ *
+ * @throws IllegalStateException if the element cannot be inserted
+ * due to capacity restriction or an
+ * {@link IoQueueListener#accept(IoQueue, Object)}
+ * which returned <tt>false</tt>
+ */
+ void addDouble(double value);
+
+ /**
+ * Inserts the specified <tt>byte</tt> value to the tail of this queue.
+ * If there's not enough room, a new {@link ByteBuffer} will be inserted
+ * first. Otherwise, the value will be put into the last (i.e. tail)
+ * {@link ByteBuffer}.
+ *
* @return <tt>true</tt> if and only if the insertion succeeded
*/
boolean offerByte(byte value);