Trustin Lee
f75ba72aeb
Allow using non-BlockingQueue
...
- NioEventLoop never uses takeTask(), and ConcurrentLinkedList is faster
than LinkedBlockingQueue
2012-08-18 18:48:44 +09:00
Trustin Lee
421eabe666
[ #473 ] Fix elevated context switching in SingleThreadEventExecutor
...
- Remove polling in SingleThreadEventExecutor
- Create a dedicated scheduled task scheduler called 'TaskScheduler'
- TaskScheduler is created per EventLoopGroup / EventExecutorGroup
- SingleThreadEventExecutor delegates all scheduled execution requests
to TaskScheduler provided as a constructor parameter
- TaskScheduler is a specialized form of single threaded
ScheduledExecutorService which requires an EventExecutor as a
parameter for all requests.
2012-08-18 18:40:21 +09:00
Trustin Lee
9c17304755
Use different EventLoopGroup for AIO transport tests
...
- plus tiny cleanup
2012-08-17 12:18:00 +09:00
Norman Maurer
8b66e65277
Merge pull request #515 from jfallows/master
...
Add support for AIO server channel accepting new channels onto a separate child event loop group. See #514 .
2012-08-14 09:58:47 -07:00
John Fallows
148e629104
Use childGroup for accepted AioSocketChannels, children of previously bound AioServerSocketChannel.
2012-08-13 23:12:50 -07:00
norman
061252e4b4
Allow to config read/write timeout for the AIO transport. See #509
2012-08-14 08:06:54 +02:00
John Fallows
06fd869711
Add support for AIO scattering reads and gathering writes.
...
o Add ByteBuf.hasNioBuffers() method
o Promote CompositeByteBuf.nioBuffers() methods to ByteBuf
o Use ByteBuf.nioBuffers() methods from AioSocketChannel
2012-08-12 17:29:07 -07:00
Trustin Lee
d3a2835503
Add ServerBootstrap.group() that takes a single group
2012-08-10 20:26:04 +09:00
Trustin Lee
d298707198
[ #502 ] Split EventLoop/EventExecutor into parent and children
...
- Add EventExecutorGroup and EventLoopGroup
- EventExecutor and EventLoop extends EventExecutorGroup and
EventLoopGroup
- They form their own group so that .next() returns itself.
- Rename Bootstrap.eventLoop() to group()
- Rename parameter names such as executor to group
- Rename *EventLoop/Executor to *EventLoop/ExecutorGroup
- Rename *ChildEventLoop/Executor to *EventLoop/Executor
2012-08-10 20:17:18 +09:00
Trustin Lee
f4fa5698c1
Add a TODO which should be done when buffer pool is implemented
2012-08-10 10:19:01 +09:00
Trustin Lee
a2aadef4da
Add ByteBuf.Unsafe.discardSomeReadBytes() to reduce discardReadBytes()
2012-08-08 17:34:00 +09:00
norman
0334333c82
Fix checkstyle
2012-08-07 15:38:52 +02:00
norman
3ed3827760
Merge branch 'master' of ssh://github.com/netty/netty
2012-08-07 14:59:54 +02:00
norman
947f3bcd5f
Merge branch 'master' of ssh://github.com/netty/netty
2012-08-07 14:46:01 +02:00
John Fallows
ed7613e183
Resolve issue #489 with an atomic readInProgress guard to prevent ReadPendingException.
2012-08-05 15:11:12 -07:00
Trustin Lee
f2eeed77e0
Remove a redundant method declaration
2012-08-05 18:43:32 +09:00
norman
3992472b30
cleanup
2012-08-01 14:06:54 +02:00
norman
b4991facf8
Remove unused import
2012-08-01 11:35:17 +02:00
norman
a3a58ecbc0
Fix a bug in suspend read. See #71
2012-08-01 11:35:03 +02:00
norman
6a15f7f5ce
Merge branch 'master' into suspend_feature
...
Conflicts:
transport/src/main/java/io/netty/channel/DefaultChannelHandlerContext.java
2012-08-01 09:03:33 +02:00
norman
16a4088344
Address @trustin 's comments and also make sure the accept of AIO is only triggered from the event loop. See #71
2012-07-31 11:42:29 +02:00
norman
8b473dce6c
Rename class
2012-07-30 15:07:12 +02:00
norman
ba1c7c5c55
Replace usage of QueueFactory with ConcurrentLinkedQueue and LinkedBlockingQueue. See #477
2012-07-30 08:01:46 +02:00
Norman Maurer
57e7255566
Add support to suspend reads. See #71
2012-07-27 20:02:47 +02:00
Daniel Bevenius
927c4ee8cb
Minor typo in exception message
2012-07-25 20:51:06 +02:00
Trustin Lee
5a613f379e
Make ByteBuf dynamic / Introduce an interface for composite buffers
...
- Replace ByteBufferBackedByteBuf with DirectByteBuf
- Make DirectByteBuf and HeapByteBuf dynamic
- Remove DynamicByteBuf
- Replace Unpooled.dynamicBuffer() with Unpooled.buffer() and
directBuffer()
- Remove ByteBufFactory (will be replaced with ByteBufPool later)
- Add ByteBuf.Unsafe (might change in the future)
2012-07-19 20:25:47 +09:00
Trustin Lee
7fbd1e5095
[ #454 ] Unnecessary thread interruption in DefaultEventExecutor
2012-07-13 13:17:35 +09:00
Trustin Lee
d801459cb8
[maven-release-plugin] prepare for next development iteration
2012-07-10 23:11:33 +09:00
Trustin Lee
527f2f6c6e
[maven-release-plugin] prepare release netty-4.0.0.Alpha1
2012-07-10 23:10:48 +09:00
Trustin Lee
1c4d0d0f57
Optimize AioEventLoop.findChannel()
2012-07-10 18:04:41 +09:00
Trustin Lee
f5fa671459
Fix regression (see comment)
2012-07-10 15:38:31 +09:00
Trustin Lee
d66a187b5d
Fixed a bug where discardReadBytes is called in a wrong place
2012-07-10 14:25:46 +09:00
Trustin Lee
170a04fc72
Revert the buggy commit in AioEventLoop
...
Also decreased the max stack depth of AioCompletionHandler to 4
(Integer.MAX_VALUE was for testing)
2012-07-10 14:12:14 +09:00
Trustin Lee
701cda2819
Require a user specify the same AioEventLoop
...
.. both when create an AIO channel and registering it
- Also fixed a bug in AbstractChannel where is does not handle
registration failure correctly.
2012-07-10 13:57:45 +09:00
Norman Maurer
d233be7041
AIO: Act on the right ByteBuf when a exception was caught during write
2012-07-09 17:27:20 +02:00
Trustin Lee
e157ea1a66
Allow a user use any type as a ReplayingDecoder state / AIO cleanup
...
- Removed VoidEnum because a user can now specify Void instead
- AIO: Prefer discardReadBytes to clear
- AIO: Fixed a potential bug where notifyFlushFutures() is not called
if flush() was requested with no outbound data
2012-07-09 20:40:43 +09:00
Norman Maurer
0289dadca4
Don't call Field.get(..) if we can avoid it
2012-07-08 17:41:12 +02:00
Norman Maurer
adb4b87fa8
Replace catch of Exception with Throwable as Field.get(..) can also throw an Error
2012-07-08 17:29:42 +02:00
Trustin Lee
a58533fdad
Due to the recent changes with AsynchronousChannelGroup use, there's no
...
need to schedule read operation later.
2012-07-09 00:04:55 +09:00
Trustin Lee
ee019d344e
Fix potential NPE in AioEventLoop / Always notify flush futures
2012-07-08 22:44:15 +09:00
Trustin Lee
e7c6ca945f
Fix potential NPE / Use discardReadBytes instead of clear()
2012-07-08 22:22:35 +09:00
Trustin Lee
c77f107f5f
Made the AIO transport faster / Fixed a bug in SingleThreadEventLoopTest
...
- Used reflection hack to dispatch the tasks submitted by JDK
efficiently. Without hack, there's higher chance of additional
context switches.
- Server side performance improved to the expected level.
- Client side performance issue still under investigation
2012-07-08 21:49:15 +09:00
Trustin Lee
bf62add6c7
Clean up
...
- Removed unnecessary 'closed' flag and redundant close() calls, etc.
2012-07-08 15:12:15 +09:00
Trustin Lee
b79e0b0882
Fix another data race
2012-07-08 14:43:34 +09:00
Trustin Lee
b97b3c602b
Add missing license header
2012-07-08 02:26:37 +09:00
Trustin Lee
cef7dfc02f
Made the AIO transport adhere to Netty thread model strictly
...
- Fixed data races
- Simplified channel creation using dummy AsyncChannelGroup
2012-07-08 00:53:56 +09:00
Trustin Lee
613834f326
Fix data corruption in the AIO transport
2012-07-07 21:29:03 +09:00
Trustin Lee
2bc26fbc70
Remove seemingly an ad-hoc test class
2012-07-07 18:49:21 +09:00
Trustin Lee
3a84b9dc71
Make test suite mostly pass by avoiding ClosedChannelException
...
- SSL echo test still fails
2012-07-07 15:34:14 +09:00
Trustin Lee
aea3ed85bd
Allow AIO channel's config is accessible as early as possible
2012-07-07 15:25:55 +09:00
Trustin Lee
c0f4f75c6d
Use SOMAXCONN as the default backlog if possible
2012-07-07 15:05:10 +09:00
Trustin Lee
ec88f6617c
Fix compilation error and warning
2012-07-07 14:48:34 +09:00
Trustin Lee
fae3861c3a
Fix a compiler warning
2012-07-07 14:46:43 +09:00
Trustin Lee
de40a8d09b
Fix another compilation error
2012-07-07 14:45:18 +09:00
Trustin Lee
c57e903c4d
Fix more compilation errors
2012-07-07 14:44:06 +09:00
Trustin Lee
0941d617d9
Fix a compilation error
2012-07-07 14:42:18 +09:00
Trustin Lee
42380b54b3
Revert file mode
2012-07-07 14:39:35 +09:00
Trustin Lee
9535401632
Revert unnecessary change in Bootstrap
2012-07-07 14:37:44 +09:00
Trustin Lee
b86e2730cc
Remove unused classes in util.internal
2012-07-07 14:30:26 +09:00
Trustin Lee
81eaea77bd
Add DatagramChannel.isConnected()
...
.. because there is no way for a user with isActive to know if
DatagramChannel is connected or not
2012-07-07 14:30:24 +09:00
Trustin Lee
a5bb2c7f77
Add ChannelMetadata and remove unnecessary disconnect() impls
...
- Add Channel.metadata() and remove Channel.bufferType()
- DefaultPipeline automatically redirects disconnect() request to
close() if the channel has no disconnect operation
- Remove unnecessary disconnect() implementations
2012-07-07 14:30:24 +09:00
Trustin Lee
faf529166f
Increase the timeout of LocalTransportThreadModelTest to 1 minute
2012-07-07 14:30:24 +09:00
Norman Maurer
c165a38e15
Revert as it should be in nio2 branch "Commit first round of classes to support nio2/async channel api. Still work in progress.. See #396 "
...
This reverts commit 18aaae3c2e
.
2012-07-07 14:30:24 +09:00
norman
31cebd7ce2
No need for AtomicBoolean as we run in the eventloop. See #396
2012-07-03 15:30:15 +02:00
norman
eccc28965e
Make sure the ComplationHandler stuff is handled in the eventloop. See #396
2012-07-03 15:25:28 +02:00
norman
7d33846690
Trigger the read() after the registration was complete. See #396
2012-07-03 13:10:29 +02:00
norman
e58d657421
Supress exception logging if the exception was expected. See #396
2012-07-03 12:01:52 +02:00
norman
c3770a0fba
Revert "Check that eventloop's were setup correctly. See #396 "
...
This reverts commit 82834c2f34
.
2012-07-03 11:50:50 +02:00
Norman Maurer
82834c2f34
Check that eventloop's were setup correctly. See #396
2012-07-01 22:39:33 +02:00
Norman Maurer
12112ac857
Use the correct outbound buffer for flush the writes. See #396
2012-07-01 22:32:45 +02:00
Norman Maurer
0562aad91f
Make sure all pending writes are flushed. See #396
2012-07-01 22:20:36 +02:00
Norman Maurer
8c0146fbd8
Supress warnings
2012-07-01 21:50:44 +02:00
Norman Maurer
e1cbcd6456
Remove left-overs. See #396
2012-07-01 21:50:17 +02:00
Trustin Lee
5caf78acc0
Fix a bug where channelActive is not fired for an accepted channel
2012-06-18 17:22:06 +09:00
Norman Maurer
127e9c1d1e
Calling clear is wrong. See #396
2012-06-17 20:28:47 +02:00
Norman Maurer
7412c371f2
Fix writes. See #396
2012-06-17 13:12:15 +02:00
Norman Maurer
22bc8fecca
Implement the right interfaces
2012-06-17 11:07:21 +02:00
Norman Maurer
5d1e710adc
Package was renamed. See #396
2012-06-16 22:31:43 +02:00
Norman Maurer
70c4f59c45
Some clean. See #396
2012-06-16 22:29:25 +02:00
Norman Maurer
314ac37732
Rename classes from Async* -> Aio*. See #396
2012-06-16 21:20:57 +02:00
Norman Maurer
67be5aeda8
Rename package from nio2 -> aio. See #396
2012-06-16 21:18:25 +02:00
Norman Maurer
ffc6551acc
Adjust name. See #396
2012-06-16 21:17:45 +02:00
Norman Maurer
2ff22ff4c3
Add javadocs and also handle writes correctly. See #396
2012-06-16 21:16:54 +02:00
Norman Maurer
70baea35da
Make reads work like expected with AOI. See #396
2012-06-16 20:51:45 +02:00
Norman Maurer
f8ef5d5d78
Next round for async channel api support a.k.a nio2. See See #396
2012-06-14 21:02:47 +02:00
Norman Maurer
032912d938
Commit first round of classes to support nio2/async channel api. Still work in progress.. See #396
2012-06-13 22:24:16 +02:00
Trustin Lee
8b7af2ca3b
Generate Javadoc with APIviz
2012-06-13 12:11:11 +09:00
Trustin Lee
90b12ba5d2
Fix a ClassCastException in EmbeddedMessageChannel
2012-06-12 21:09:33 +09:00
Trustin Lee
dfce95dd5a
Remove unused type
2012-06-12 18:09:05 +09:00
Trustin Lee
660e4548a6
Fix an unexpected RejectedExecutionException
...
- Ensure to run all remaining tasks before marking the executor as
'shut down'.
2012-06-12 17:41:06 +09:00
Trustin Lee
3393629eed
Log the cause of exceptionCaught event when failed to notify
2012-06-12 17:25:27 +09:00
Trustin Lee
3b562c917d
Move ChannelBufferType to netty-buffers and rename it to ChannelBufType
...
- Also add ChannelBuf.type()
2012-06-12 17:05:28 +09:00
Trustin Lee
ecd0ae5406
Prefer MessageBuf over Queue where possible
...
- Also replaced thread safe queues with non-thread-safe ones where
possible
- Unpooled.wrappedBuffer(Queue<T>) does not wrap MessageBuf anymore
2012-06-12 17:02:00 +09:00
Trustin Lee
e1faea035e
Automatic clean-up with Eclipse
...
- Mostly import organization & whitespace removal
2012-06-11 23:04:04 +09:00
Trustin Lee
6211e53e86
Code clean-up based on IntelliJ code analysis
2012-06-11 22:54:28 +09:00
Trustin Lee
876847fd20
Merge MessageBufs and ByteBufs into Unpooled
...
- e.g. Unpooled.messageBuffer()
- It will make much more sense once we introduce pooling:
- i.e. Pooled.buffer()
2012-06-11 17:02:29 +09:00
Trustin Lee
d27a27c980
Fix a bug where channelInactive() is not triggered for local transport
2012-06-11 11:59:00 +09:00
Trustin Lee
cf0259661e
Fix a race condition where local channel's closeFuture is notified early
...
- Added AbstractChannel.doPreClose() to allow a transport to perform
a task before closeFuture is notified
2012-06-11 11:53:43 +09:00
Trustin Lee
632542e0cd
Make a CPU-intensive test pass on a slow machine
2012-06-11 11:42:11 +09:00
Trustin Lee
f3bbb7291e
Remove a bad assertion
2012-06-11 11:39:44 +09:00