Trustin Lee
4dd9b6ef2e
Add ByteBufProcessor and ByteBuf.forEach(...)
...
- Fixes #1378
- Needs to provide optimized forEach implementations though.
2013-06-27 13:55:42 +09:00
Trustin Lee
734ec51ac9
Allow specifying 0 as the default number of threads when instantiating an EventLoopGroup
...
- Fixes #1426
- We already allow a user instantiate an EventLoopGroup with the default number of threads via the default constructor, so I think it's OK although it's not always optimal.
2013-06-27 10:39:39 +09:00
Trustin Lee
bc483724f4
Improve the documentation of MessageList
...
- Fixes #1459
2013-06-25 18:27:29 +09:00
Trustin Lee
1f27c3b390
Make NioByteUnsafe.read() respect ChannelConfig.maxMessagesPerRead and adjust the default from 16 to 1
...
- Fixes #1486
- Decreased the default from 16 to 1 because unnecessary extra read on req-res protocols results in lower throughput due to extra syscalls.
2013-06-25 18:08:39 +09:00
Trustin Lee
a1632e7d15
Add ChannelConfig.maxMessagesPerRead and ChannelOption.MAX_MESSAGES_PER_READ
...
- Fixes #1486
- Make sure AbstractNioMessageChannel.NioMessageUnsafe.read() only up to maxMessagesPerRead
2013-06-25 17:49:28 +09:00
Trustin Lee
a6795d7780
[maven-release-plugin] prepare for next development iteration
2013-06-25 11:07:15 +09:00
Trustin Lee
2221446425
[maven-release-plugin] prepare release netty-4.0.0.CR6
2013-06-25 11:07:15 +09:00
Trustin Lee
c77f03d886
Fix AdaptiveRecvByteBufAllocator.getSizeTableIndex()
2013-06-25 11:07:15 +09:00
Norman Maurer
c9d01b2fb5
[ #1461 ] Correctly handle DefaultChannelGroup.write(..) of ByteBuf and ByteBufHolder
2013-06-25 11:07:14 +09:00
Trustin Lee
cfb3b977a1
Fix the catastrophic failure caused by AdaptiveRecvByteBufAllocator.getSizeTableIndex()
2013-06-25 11:07:14 +09:00
Trustin Lee
a2f232720b
Make AdaptiveRecvByteBufAllocator's lookup table simpler / Optimize buffer size normalization
...
- No need to have fine-grained lookup table because the buffer pool has
much more coarse capacities available
- No need to use a loop to normalize a buffer capacity
2013-06-25 11:07:14 +09:00
Trustin Lee
a969613540
Merge ChannelInboundConsumingHandler into SimpleChannelInboundHandler
...
- SimpleChannelInboundHandler now has a constructor parameter to let a
user decide to enable automatic message release. (the default is to
enable), which makes ChannelInboundConsumingHandler of less value.
2013-06-25 11:07:14 +09:00
Norman Maurer
bfc9c6d80d
Add ChannelInboundConsumingHandler
...
..which is useful when the handler is placed at the last position of the
pipeline because it releases the received messages automatically.
2013-06-25 11:07:14 +09:00
Tony Rice
6c5c119f8c
Fix incorrect parameter validation in DefaultFileRegion
2013-06-25 11:07:14 +09:00
Norman Maurer
cce74efded
[ #1448 ] Don't print failure if VoidChannelPromise is used
2013-06-16 14:25:02 +02:00
Norman Maurer
6a9f965f9b
Introduce new utility class calles ReferenceCountUtil and move utility methods from ByteBufUtil to it.
...
The ones in ByteBufUtil were marked as @deprecated
2013-06-14 07:07:33 +02:00
Norman Maurer
4bf5003f76
Don't release messages before throw UnsupportedOperationException, as the caller method will take care
2013-06-14 06:41:27 +02:00
Trustin Lee
a5871dfd86
[maven-release-plugin] prepare for next development iteration
2013-06-14 12:55:15 +09:00
Trustin Lee
f5377cc8d7
[maven-release-plugin] prepare release netty-4.0.0.CR5
2013-06-14 12:55:05 +09:00
Trustin Lee
fe40d4b67f
Make sure writing to a closed channel does not trigger an UnsupportedOperationException
...
- Fixes #1442
2013-06-14 11:15:46 +09:00
Trustin Lee
25c51279cf
Revert "[ #1442 ] Make sure closing the channel will not cause an UnsupportedOperationException"
...
This reverts commit a1a86b9de4
because the
semantic of ctx.isRemoved() is confusing to a user - why is
ctx.isRemoved() false when handlerRemoved() is invoked? A better
solution would be check if the connection is inactive and mark the
promise as failure before attempting to write anything.
2013-06-14 10:47:31 +09:00
Trustin Lee
a0c082497a
Remove unused exception classes
2013-06-14 10:21:41 +09:00
Norman Maurer
8edee3272a
More javadoc fixes
2013-06-13 20:56:17 +02:00
Norman Maurer
dc070a00b2
Deprecate IncompleteFlushException as its not used anymore
2013-06-13 20:50:21 +02:00
Norman Maurer
9100256a56
Javadocs cleanup
2013-06-13 20:49:05 +02:00
Norman Maurer
0e16b22aa1
Deprecate NoSuchBufferException as it's not used anymore
2013-06-13 20:48:54 +02:00
Norman Maurer
a1a86b9de4
[ #1442 ] Make sure closing the channel will not cause an UnsupportedOperationException
2013-06-13 18:10:56 +02:00
Trustin Lee
e5ca6518ba
[maven-release-plugin] prepare for next development iteration
2013-06-13 17:02:32 +09:00
Trustin Lee
381063e09c
[maven-release-plugin] prepare release netty-4.0.0.CR4
2013-06-13 17:02:19 +09:00
Trustin Lee
427d9c4bf2
Fix test failures and reported leaks
2013-06-13 15:18:11 +09:00
Trustin Lee
f178b8d421
Suppress duplicate warning message printed when a message reaches at the end of pipeline
2013-06-13 13:23:52 +09:00
Trustin Lee
175526b6bd
Move ReferenceCounted and AbstractReferenceCounted to io.netty.util
...
- Fixes #1441
- Also move and rename IllegalBufferAccessException to ReferenceCountException
- Prettier reference count exception messages
2013-06-13 13:14:21 +09:00
Trustin Lee
283feda119
Reduce even more garbage by exposing ByteBuf.internalNioBuffer()
2013-06-13 12:40:26 +09:00
Trustin Lee
5131c024fa
Tiny optimization
2013-06-13 12:15:41 +09:00
Trustin Lee
96380e756c
Fix test failures introduced by 78d8f05c21
2013-06-13 11:51:03 +09:00
Trustin Lee
2088d1b491
Generate less garbage when performing gathering writes
2013-06-13 10:27:10 +09:00
Norman Maurer
d1a3806ebd
Make use of gathering writes if a MessageList which only contains ByteBuf msgs is written to a NioSocketChannel
2013-06-12 09:45:33 +02:00
Trustin Lee
79e236dfc2
Make EventExecutor.shutdownGracefully() return Future
...
- Also added EventExecutor.terminationFuture()
- Also fixed type signature problem with Future.add/removeListener()
- Related issue: #1389
2013-06-12 08:00:54 +09:00
Trustin Lee
fd0084ecfa
Remove the constructors that uses ImmediateEventExecutor from DefaultChannelGroup
...
.. which is incorrect in my opinion.
+ minor cleanup
2013-06-12 06:50:38 +09:00
Trustin Lee
7a1550631d
Make write operation cancellation while it's in progress
...
.. which should be useful when writing a large buffer/file
2013-06-12 04:24:07 +09:00
Norman Maurer
5b978497f8
Cleanup
2013-06-11 16:24:06 +02:00
Trustin Lee
c3034c8964
Implement the cancellation of connection attmpe for NIO and OIO transport
...
- Related issue: #1432
- Also added test cases to validate the implementation
2013-06-11 18:46:39 +09:00
Trustin Lee
7a5cf48b8d
Implement Promise/Future cancellation properly for outbound traffic
...
- Related issue: #1432
- Make sure the Promise of a write operation is not cancellable before writing out
2013-06-11 17:54:35 +09:00
Trustin Lee
41af9a1eb3
Implement cancellation properly for Promise/Future
...
- Related issue: #1432
- Add Future.isCancellable()
- Add Promise.setUncancellable() which is meant to be used for the party that runs the task uncancellable once started
- Implement Future.isCancelled() and Promise.cancel(boolean) properly
2013-06-11 17:46:21 +09:00
Norman Maurer
85afdda3ce
Correctly write MessageList which contains more then one message
2013-06-11 10:30:15 +02:00
Norman Maurer
16e12b45f8
Use Correct NoSuchElementException
2013-06-11 07:57:35 +02:00
Norman Maurer
e4a985f6ac
Let MessageList implement Iterable
2013-06-11 07:55:41 +02:00
Norman Maurer
f2f6d68d2e
Make sure writing empty ByteBuf will not cause a stavation.
...
This also fixes [#1436 ]
2013-06-10 20:54:17 +02:00
Trustin Lee
3ce9ab2e72
Replace the sun.nio.ch.SelectorImpl.selectedKeys with faster one
...
- Yield much less garbage
- Slight performance gain (1~2%)
2013-06-11 00:00:55 +09:00
Norman Maurer
d9806c8127
Add javadocs
2013-06-10 14:23:40 +02:00