alexey
738d382fbc
Added test cases for NetUtil methods, if we can`t convertAddress we return null
2012-12-29 18:31:53 +01:00
Norman Maurer
0fb0037eab
Rename IpAddresses to NetUtil
2012-12-29 18:25:32 +01:00
Norman Maurer
5d13c7d27b
Merge IPUtil and NetworkConstants into IpAddresses and also make naming of methods consistent
2012-12-29 18:17:33 +01:00
Norman Maurer
213c1e3d23
Replace sun.net.util.IPAddressUtil usage with own implementation
2012-12-29 18:13:44 +01:00
Trustin Lee
85e1684084
Simpler method naming in Timeout
2012-12-26 13:50:01 +09:00
Trustin Lee
6b9f7065a2
Simpler and more comprehensive method naming in monitor
2012-12-26 13:48:29 +09:00
Norman Maurer
7db47dd0d0
Finish javadocs for common module
2012-12-21 08:16:00 +01:00
Trustin Lee
ad10518fca
Fix the incorrect snapshot version number
2012-12-13 22:49:31 +09:00
Norman Maurer
85c570505b
[maven-release-plugin] prepare for next development iteration
2012-12-03 20:34:05 +01:00
Norman Maurer
17d77ed160
[maven-release-plugin] prepare release netty-4.0.0.Alpha8
2012-12-03 20:33:49 +01:00
Trustin Lee
33c0c89fef
Remove unnecessary empty lines
2012-12-03 19:58:13 +09:00
Trustin Lee
818a7b42a3
Fix all Xlint:unchecked warnings
2012-11-30 22:49:51 +09:00
Trustin Lee
81e2db10fa
ByteBufAllocator API w/ ByteBuf perf improvements
...
This commit introduces a new API for ByteBuf allocation which fixes
issue #643 along with refactoring of ByteBuf for simplicity and better
performance. (see #62 )
A user can configure the ByteBufAllocator of a Channel via
ChannelOption.ALLOCATOR or ChannelConfig.get/setAllocator(). The
default allocator is currently UnpooledByteBufAllocator.HEAP_BY_DEFAULT.
To allocate a buffer, do not use Unpooled anymore. do the following:
ctx.alloc().buffer(...); // allocator chooses the buffer type.
ctx.alloc().heapBuffer(...);
ctx.alloc().directBuffer(...);
To deallocate a buffer, use the unsafe free() operation:
((UnsafeByteBuf) buf).free();
The following is the list of the relevant changes:
- Add ChannelInboundHandler.freeInboundBuffer() and
ChannelOutboundHandler.freeOutboundBuffer() to let a user free the
buffer he or she allocated. ChannelHandler adapter classes implement
is already, so most users won't need to call free() by themselves.
freeIn/OutboundBuffer() methods are invoked when a Channel is closed
and deregistered.
- All ByteBuf by contract must implement UnsafeByteBuf. To access an
unsafe operation: ((UnsafeByteBuf) buf).internalNioBuffer()
- Replace WrappedByteBuf and ByteBuf.Unsafe with UnsafeByteBuf to
simplify overall class hierarchy and to avoid unnecesary instantiation
of Unsafe instances on an unsafe operation.
- Remove buffer reference counting which is confusing
- Instantiate SwappedByteBuf lazily to avoid instantiation cost
- Rename ChannelFutureFactory to ChannelPropertyAccess and move common
methods between Channel and ChannelHandlerContext there. Also made it
package-private to hide it from a user.
- Remove unused unsafe operations such as newBuffer()
- Add DetectionUtil.canFreeDirectBuffer() so that an allocator decides
which buffer type to use safely
2012-11-22 15:10:59 +09:00
dantran
4107b08f29
Only generate OSGi manifest only at all-in-on sub module to reduce the complexity to the build
2012-11-19 06:27:18 +01:00
dantran
105f952f5d
Clean up maven-bungle-plugin warnings
2012-11-12 11:42:42 +01:00
dantran
e236f5b77d
[ #154 ] [ #727 ] Use maven-plugin-plugin to generate OSGi manifest
2012-11-12 09:15:36 +01:00
Trustin Lee
ec7849ac09
Allow '_' in parameter names although discouraged
2012-11-12 13:39:24 +09:00
Trustin Lee
a05064d3eb
Fix more inspection warnings + compilation errors
2012-11-12 13:25:00 +09:00
Trustin Lee
36c8eb02e8
Fix parameter namings + some more
2012-11-12 12:59:37 +09:00
Trustin Lee
6f2840193a
Fix inspection warnings related with JUnit usage
2012-11-12 12:45:06 +09:00
Trustin Lee
aedf8790c3
Fix various Javadoc issues / Do not use argN parameter names
2012-11-12 12:26:19 +09:00
Trustin Lee
ea4a0e3535
Prefer {@code ...} to <code>...</code> / Fix deprecation warnings
2012-11-12 11:51:23 +09:00
Trustin Lee
d78f5a4f76
Optimize imports / Remove britspace
2012-11-12 09:51:59 +09:00
Trustin Lee
9746bb2036
Make a member field final wherever possible
2012-11-12 09:43:55 +09:00
Trustin Lee
4dce19b814
Replace a variable with a constant wherever possible
2012-11-12 09:43:14 +09:00
Trustin Lee
aa7cd691df
Remove redundant 'else' branches.
2012-11-12 09:31:40 +09:00
Trustin Lee
91a61d7f43
Remove unnecessary qualifiers
2012-11-12 09:11:48 +09:00
Trustin Lee
61d872d6e2
Suppress false-positive inspection warnings /
2012-11-12 09:05:16 +09:00
Trustin Lee
a07fb94fe7
Prefer "str".equals(var) to var.equals("str") / Add proper null checks
2012-11-12 08:59:54 +09:00
Trustin Lee
5d45880b9e
Fix a failing test
...
There's practically no way to test if the detected localhost is good if the user's environment is broken.
2012-11-10 08:50:21 +09:00
Trustin Lee
250c2545e6
Fix a compilation error (sorry!)
2012-11-10 08:48:00 +09:00
Trustin Lee
0b30bf613d
More robust localhost resolution
...
Ensure the resolved localhost can be bound and connected actually
2012-11-10 08:45:07 +09:00
Trustin Lee
b4f796c5e3
Use 'x' over "x" wherever possible / String.equals("") -> isEmpty()
2012-11-10 08:03:52 +09:00
Trustin Lee
f77f13faf0
Make classes static wherever possible
2012-11-10 07:32:53 +09:00
Trustin Lee
c77bac44a2
Fix unchecked warnings
2012-11-10 07:29:14 +09:00
Trustin Lee
23883d25ee
Remove various unnecessary qualifiers
2012-11-10 07:03:07 +09:00
Trustin Lee
958d04a42b
Remove redundant throws clauses / Suppress inspections for some false positives
2012-11-10 06:47:59 +09:00
Trustin Lee
a5a19efb4b
Remove unnecessary this, parenthesis, and semicolons
2012-11-10 02:27:33 +09:00
Trustin Lee
58ba0de659
Remove unnecessarily qualified static access
2012-11-10 01:32:21 +09:00
Trustin Lee
bbcb035246
Prefer isEmpty() over size() == 0 or length() == 0
2012-11-10 01:24:04 +09:00
Trustin Lee
e21dc5925d
Replace dynamic regular expressions with precompiled Patterns or new StringUtil.split()
2012-11-10 00:41:22 +09:00
Trustin Lee
96a769805b
Fix utility classes - missing final modifiers etc
2012-11-09 17:44:40 +09:00
Norman Maurer
313f777491
[maven-release-plugin] prepare for next development iteration
2012-11-05 23:08:39 +01:00
Norman Maurer
57da8222a4
[maven-release-plugin] prepare release netty-4.0.0.Alpha7
2012-11-05 23:08:28 +01:00
Norman Maurer
87cc67306f
[maven-release-plugin] prepare for next development iteration
2012-10-28 18:41:25 +01:00
Norman Maurer
7315490fca
[maven-release-plugin] prepare release netty-4.0.0.Alpha6
2012-10-28 18:41:17 +01:00
Norman Maurer
afc687436a
Revert "[maven-release-plugin] prepare release netty-4.0.0.Alpha6"
...
This reverts commit 95de4db0f1
.
2012-10-28 18:36:15 +01:00
Norman Maurer
16eb4ec713
Revert "[maven-release-plugin] prepare for next development iteration"
...
This reverts commit e3e0776c20
.
2012-10-28 18:35:47 +01:00
Norman Maurer
e3e0776c20
[maven-release-plugin] prepare for next development iteration
2012-10-28 13:06:07 +01:00
Norman Maurer
95de4db0f1
[maven-release-plugin] prepare release netty-4.0.0.Alpha6
2012-10-28 13:05:59 +01:00
Norman Maurer
71254e4bb5
Fix typos
2012-10-27 20:31:55 +02:00
Norman Maurer
5a8486e39c
Correct test
2012-10-27 19:57:59 +02:00
Olaf Bergner
ddd0734f43
Issue #65 : Provide distribution stats for HashedWheelTimer
...
First cut at implementing a generic abstraction layer for pluggable
metrics providers. This first cut is closely modeled after Yammer
Metrics. It remains to be seen if it is indeed flexibel enough to
support other providers.
Provide a default implementation of this new abstraction layer
based on Yammer Metrics.
Support pluggable Monitoring Providers using Java 6's ServiceLoader.
Use this new abstraction layer to provide stats on (a) number of
Timeouts executed per second and (b) distribution of absolute
deviation between scheduled and actual Timeout execution time in
HashedWheelTimer.
* Interface ValueDistributionMonitor, a monitor for histograms.
* Interface EventRateMonitor, a monitor for measuring the rate per time
unit of specific events.
* Interface ValueMonitor, a monitor for tracking an arbitrary datum's
current value
* Interface CounterMonitor, a monitor for incrementing/decrementing a
long value
* Interface MonitorRegistry, a registry for monitors that serves as the
interface between Netty and concrete metrics providers as e.g. Yammer
Metrics.
* Interface MonitorRegistryFactory, to be implemented by metrics
providers.
* Document how to use Netty's new monitoring support in javadocs for
package io.netty.monitor.
2012-10-25 23:10:15 +02:00
Trustin Lee
bd8c4fe050
[ #679 ] Netty 3.5.8 breaks app on startup with NPE
...
- Get system property when requested; do not cache it.
Conflicts:
common/src/main/java/io/netty/util/internal/SystemPropertyUtil.java
2012-10-24 10:42:10 -07:00
Norman Maurer
d9d8acf331
Fix NPE which accours when Netty was used in an Applet. See #669
2012-10-21 19:54:08 +02:00
Trustin Lee
b291d85757
Reduce synchronization overhead in HashedWheelTimer.start/stop()
2012-10-16 13:36:36 -07:00
Trustin Lee
820af50b63
[maven-release-plugin] prepare for next development iteration
2012-09-28 17:57:40 +09:00
Trustin Lee
595e1067c7
[maven-release-plugin] prepare release netty-4.0.0.Alpha5
2012-09-28 17:57:04 +09:00
norman
3295145e88
[maven-release-plugin] prepare for next development iteration
2012-09-13 10:40:52 +02:00
norman
42685759de
[maven-release-plugin] prepare release netty-4.0.0.Alpha4
2012-09-13 10:40:44 +02:00
Trustin Lee
37a80ddd08
Fix incorrect Java 7 detection
2012-09-03 16:15:58 +09:00
Trustin Lee
21c9c26ff8
Add SystemPropertyUtil.refresh()
2012-09-03 16:08:22 +09:00
Trustin Lee
f1c07dbf0b
Fix more compiler warnings
2012-09-01 17:00:24 +09:00
Trustin Lee
85f8247cef
Fix compiler warnings
2012-09-01 16:58:33 +09:00
Trustin Lee
00f737c3a4
Move system property access operations to SystemPropertyUtil
2012-09-01 16:52:47 +09:00
Trustin Lee
85f47d639f
Use class names instead of fields to detect Java version
...
.. because some use patched JDK with backported fields.
2012-09-01 13:08:44 +09:00
Trustin Lee
f2538a996d
[maven-release-plugin] prepare for next development iteration
2012-08-30 16:47:52 +09:00
Trustin Lee
628c5598b3
[maven-release-plugin] prepare release netty-4.0.0.Alpha3
2012-08-30 16:46:58 +09:00
Trustin Lee
68e86d8667
[ #576 ] UDP socket bind to specific IP does not receive broadcast on Linux
...
- Log a warning message if a user attempts to bind to a non-wildcard
address with SO_BROADCAST set on non-Windows
2012-08-30 15:50:55 +09:00
Trustin Lee
f78f4fc0ff
Remove a unused internal class
2012-08-28 16:22:43 +09:00
Trustin Lee
518c44a826
Remove a unused internal class
2012-08-28 16:21:45 +09:00
Trustin Lee
73720c422d
[maven-release-plugin] prepare for next development iteration
2012-08-21 15:41:04 +09:00
Trustin Lee
68bef8cb99
[maven-release-plugin] prepare release netty-4.0.0.Alpha2
2012-08-21 15:40:45 +09:00
Trustin Lee
0a43350c66
[maven-release-plugin] prepare for next development iteration
2012-08-21 14:41:45 +09:00
Trustin Lee
56211fee59
[maven-release-plugin] prepare release netty-4.0.0.Alpha2
2012-08-21 14:39:59 +09:00
Trustin Lee
a0e34fd93a
[maven-release-plugin] prepare for next development iteration
2012-08-21 14:13:38 +09:00
Trustin Lee
72ccf65093
[maven-release-plugin] prepare release netty-4.0.0.Alpha2
2012-08-21 14:13:17 +09:00
Norman Maurer
e2cafa9ec1
Merge pull request #544 from CruzBishop/testcases-1
...
More test cases (Round one)
2012-08-20 21:52:13 -07:00
Cruz Julian Bishop
11d9334dee
Adds some more test cases
...
This adds test cases to test against:
1: DefaultAttributeMap / DefaultAttribute (100%)
2: NetworkConstants (61.9%, functionally 100%)
3: StringUtil (50%, functionally 100%)
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-21 10:20:21 +10:00
Cruz Julian Bishop
b3a9ee1d71
Removes an unneeded assertion in UniqueNameTest
...
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-21 09:34:52 +10:00
Cruz Julian Bishop
6e3b9ed634
More test cases: Round one
...
This tests the following classes more:
1: InternalLoggerFactoryTest
Tests InternalLoggerFactory.getInstance(Class)
2: UniqueName
Paired with #543 , this achieves 100% code coverage with tests
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-21 09:32:00 +10:00
Cruz Julian Bishop
67e6c4bdca
Optimize UniqueName.compareTo(other) slightly
...
Replaces a manual check of IDs with one built in to Java
At least it makes the code smaller!
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-21 09:27:14 +10:00
Trustin Lee
0b11fb2ead
[ #531 ] Move io.netty.util.Signal to io.netty.util.internal
2012-08-18 18:50:54 +09:00
Trustin Lee
aef7a14852
Merge the pull request #432 manually
...
- Add UniqueNameTest
- Add JavaDoc for UniqueName
2012-08-17 12:42:30 +09:00
Cruz Julian Bishop
8d90f3adf6
Added a function to get a UniqueName's ID
...
This fixes #431
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-14 15:44:05 +10:00
norman
0daf37aae3
Remove unused classes. See #477
2012-07-30 08:05:25 +02:00
izstas
f3f40b2425
Added TRACE level to Internal Logger
2012-07-19 16:09:48 +04: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
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
Trustin Lee
c0f4f75c6d
Use SOMAXCONN as the default backlog if possible
2012-07-07 15:05:10 +09:00
Trustin Lee
391fe71639
Remove unused classes / Make HashedWheelTimer not use ReusableIterator
2012-07-07 13:52:54 +09:00
Trustin Lee
cda2d6f5aa
No more mind-boggling ExternalResourceReleasable
2012-07-07 13:42:36 +09:00
Trustin Lee
8dc1f321cb
Remove unused classes in util.internal
2012-07-07 13:41:49 +09:00
Trustin Lee
9af7512c35
Use String.CASE_INSENSITIVE_ORDER instead of custom Comparator
2012-07-07 13:30:28 +09:00
Cruz Julian Bishop
04cf836cf0
Change Timeout.cancel() to return a boolean value, true on a successful cancel
...
As requested in the javadoc for HashedWheelTimer
2012-06-29 21:59:48 +10:00
Norman Maurer
33c42bee6d
Merge pull request #409 from Massive-Dynamics/network-constants-doc
...
Adds javadoc to NetworkConstants
2012-06-28 05:08:01 -07:00
Cruz Julian Bishop
1d1d7b2a95
Add documentation to NonReentrantLock
2012-06-28 16:37:41 +10:00
Cruz Julian Bishop
90e22644c3
Adds javadoc to NetworkConstants
...
Also renames some internal variables to be more understandable
No API changes! :)
2012-06-27 17:41:49 +10:00
Trustin Lee
6211e53e86
Code clean-up based on IntelliJ code analysis
2012-06-11 22:54:28 +09:00