-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added writeVoidPromise, writeAndFlushVoidPromise methods to ChannelGr…
…oup and DefaultChannelGroup Motivation: Reduce Objects and GC by option. Give the option to developers to be able to choose to Channel.voidPromise() when making group writes. This will reduce object creation for ChannelGroup writes and writeAndFlush's by adding additional methods which add the Channel.voidPromise() into the Channel.write() portion of the method. Modifications: * ChannelGroup.class - Added new methods to the interface along with documentation to the regular method and addition documentation specificly the purpose of the new methods. ChannelGroupFuture writeVoidPromise(Object message);, ChannelGroupFuture writeVoidPromise(Object message, ChannelMatcher matcher);, ChannelGroupFuture writeAndFlushVoidPromise(Object message);, ChannelGroupFuture writeAndFlushVoidPromise(Object message);. * DefaultChannelGroup now implements these new interface methods in the utilizing the existing write and writeAndFlush method by coping them and then adding Channel.voidPromise() to the two methods that actually have the write logic - public ChannelGroupFuture writeVoidPromise(Object message, ChannelMatcher matcher) and public ChannelGroupFuture writeAndFlushVoidPromise(Object message, ChannelMatcher matcher). Result: Netty.io API users will now be able to use DefaultChannelGroup.writeVoidPromise() and DefaultChannelGroup.writeAndFlushVoidPromise();, and be able to save on object creation and GC when not caring about the FuturePromise. closes #3127
- Loading branch information
Underbalanced
committed
Nov 17, 2015
1 parent
8accc52
commit 462039d
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
462039d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity pull requests :: netty Build 671 is now running
462039d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity pull requests :: netty Build 671 outcome was SUCCESS
Summary: Tests passed: 5695, ignored: 21 Build time: 00:44:20