Commit Graph

241 Commits

Author SHA1 Message Date
Prajwal Tuladhar
915cb8b55c [#744] Port fixes from Akka to HashedWheelTimer
port fix from Akka with following commits:
*
https://github.com/akka/akka/commit/cb4e3536b0ed3483bd3636d7789c0ddcadaf
a2da
*
https://github.com/akka/akka/commit/7e590f3071bdf89a4aa9d7d262bac8923d85
e754

And also use constants for worker state for time instead of numeric.
2013-03-22 12:26:15 +01:00
Trustin Lee
fa02ffddae Remove TaskScheduler and ImmediateEventExecutor that requires TaskScheduler
- Related issue: #817
2013-03-22 09:06:08 +09:00
Trustin Lee
4323fea5fb Fix a bug where TypeParameterMatcher does not detect the case where the type parameter is derived from an outer class
- Fixes #1153
2013-03-14 07:22:44 +09:00
Norman Maurer
17ebbdec20 Let ChannelGroupFuture extends ChannelFuture and ChannelGroupFutureListener GenericFutureListener 2013-03-12 08:35:39 +01:00
Trustin Lee
ed825de4bf Fix a bug where TypeParameterMatcher raises ClassCastException when an instance with raw type parameter is given 2013-03-09 09:19:34 +09:00
Trustin Lee
b712b030fa Fix a bug where TypeParameterMatcher fails when a type parameter is an array
- Fixes #1103
2013-02-28 10:29:03 -08:00
Trustin Lee
671f9d48d4 Use ConcurrentHashMapV8 wherever possible
- Fixes #1052
2013-02-26 15:54:51 -08:00
Trustin Lee
f67441354a Move logging classes from internal to internal.logging
.. because internal is crowded
2013-02-26 14:54:25 -08:00
Trustin Lee
742db71a52 Fix IllegalAccessError when Javassist is used 2013-02-13 23:56:55 -08:00
Trustin Lee
53c27ef5ae More robust type parameter detection
- Also removed unnecessary constructors which were added due to incomplete type parameter detection logic
2013-02-13 19:02:55 -08:00
Trustin Lee
b4f4b95739 Move io.netty.logging to io.netty.internal / Move Signal out of internal because we use it in Channel*MessageAdapters 2013-02-11 20:08:18 +09:00
Trustin Lee
b60e0b6a51 Modernize InternalLogger API and enable logging framework autodetection
- Borrow SLF4J API which is the best of the best
- InternalLoggerFactory now automatically detects the logging framework
  using static class loading. It tries SLF4J, Log4J, and then falls back
  to java.util.logging.
- Remove OsgiLogger because it is very likely that OSGi container
  already provides a bridge for existing logging frameworks
- Remove JBossLogger because the latest JBossLogger implementation seems
  to implement SLF4J binding
- Upgrade SLF4J to 1.7.2
- Remove tests for the untestable logging frameworks
- Remove TestAny
2013-01-19 20:50:52 +09:00
Trustin Lee
24acfe7008 Remove io.netty.monitor as discussed in #922 2013-01-18 11:08:57 +09:00
Trustin Lee
eb337ff5a7 Fix various inspection warnings 2013-01-10 15:23:58 +09:00
Courtney Robinson
3a52cc410a Add some of the metrics mentioned in #718
use single static initialization of available metrics monitor registries

* This changes the original implementation to work in a similar way to
how slf4j selects and loads an implementation.
* Uses a single static instance so intialization is done only once.
* Doesn't throw IllegalStateException if multiple implementations are
found on the classpath. It instead selects and uses the first
implementation returned by iterator()
* Class left as an iterable to keep the API the same

add yammer metrics to examples to allow them to publish metrics

publish the number of threads used in an EventLoopGroup see issue #718

* seems like the better place to put this because it sets the default
thread count if the MultithreadEventLoopGroup uses super(0,...)
* It also happens to be the common parent class amongst all the
MultiThreadedEventLoopGroup implementations
* Count is reported for
io.netty.channel.{*,.local,.socket.aio,.socket.nio}

fix cosmetic issues pointed out in pull request and updated notice.txt

see https://github.com/netty/netty/pull/780

count # of channels registered in single threaded event loop

measure how many times Selector.select return before SELECT_TIME
2013-01-04 11:27:49 +01:00
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
Trustin Lee
6b9f7065a2 Simpler and more comprehensive method naming in monitor 2012-12-26 13:48:29 +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
91a61d7f43 Remove unnecessary qualifiers 2012-11-12 09:11:48 +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
23883d25ee Remove various unnecessary qualifiers 2012-11-10 07:03:07 +09:00
Trustin Lee
e21dc5925d Replace dynamic regular expressions with precompiled Patterns or new StringUtil.split() 2012-11-10 00:41:22 +09: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
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
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
Trustin Lee
aef7a14852 Merge the pull request #432 manually
- Add UniqueNameTest
- Add JavaDoc for UniqueName
2012-08-17 12:42:30 +09:00
izstas
f3f40b2425 Added TRACE level to Internal Logger 2012-07-19 16:09:48 +04:00
Trustin Lee
8dc1f321cb Remove unused classes in util.internal 2012-07-07 13:41:49 +09:00
Trustin Lee
1eced1e9e3 Update license headers 2012-06-04 13:31:44 -07:00
Trustin Lee
77274ae743 Automated code clean-up 2012-05-31 12:03:01 -07:00
Trustin Lee
dd2e36e5d9 Remove unused or unmaintainable internal classes 2012-05-15 17:10:54 +09:00
Trustin Lee
83026f29a4 Make EventLoop a ScheduledExecutorService
- SingleThreadEventLoop now implements ScheduledExecutorService
  - Scheduled tasks are automatically fetched into taskQueue by
    pollTask() and takeTask()
- Removed MapBackedSet because Java 6 provides it
2012-05-11 20:19:57 +09:00
Trustin Lee
303c1b5f79 Overall cleanup / Add lost old jzlib headers 2012-01-13 17:41:18 +09:00
Trustin Lee
8663716d38 Issue #60: Make the project multi-module
Split the project into the following modules:
* common
* buffer
* codec
* codec-http
* transport
* transport-*
* handler
* example
* testsuite (integration tests that involve 2+ modules)
* all (does nothing yet, but will make it generate netty.jar)

This commit also fixes the compilation errors with transport-sctp on
non-Linux systems.  It will at least compile without complaints.
2011-12-28 19:44:04 +09:00