Make DefaultEventExecutor usable by users.
Motivation: There's no reason to keep our users from using DefaultEventExecutor directly. It should be actually very useful to them. Modifications: Make DefaultEventExecutor public and add useful public constructors. Result: DefaultEventExecutor got usable by anyone, yielding more value as a generic library.
This commit is contained in:
parent
4332821e6f
commit
924113ce8c
@ -16,15 +16,35 @@
|
||||
package io.netty.util.concurrent;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
/**
|
||||
* Default {@link SingleThreadEventExecutor} implementation which just execute all submitted task in a
|
||||
* serial fashion
|
||||
*
|
||||
*/
|
||||
final class DefaultEventExecutor extends SingleThreadEventExecutor {
|
||||
public final class DefaultEventExecutor extends SingleThreadEventExecutor {
|
||||
|
||||
DefaultEventExecutor(DefaultEventExecutorGroup parent, Executor executor) {
|
||||
public DefaultEventExecutor() {
|
||||
this((EventExecutorGroup) null);
|
||||
}
|
||||
|
||||
public DefaultEventExecutor(ThreadFactory threadFactory) {
|
||||
this(null, threadFactory);
|
||||
}
|
||||
|
||||
public DefaultEventExecutor(Executor executor) {
|
||||
this(null, executor);
|
||||
}
|
||||
|
||||
public DefaultEventExecutor(EventExecutorGroup parent) {
|
||||
this(parent, new DefaultThreadFactory(DefaultEventExecutor.class));
|
||||
}
|
||||
|
||||
public DefaultEventExecutor(EventExecutorGroup parent, ThreadFactory threadFactory) {
|
||||
super(parent, threadFactory, true);
|
||||
}
|
||||
|
||||
public DefaultEventExecutor(EventExecutorGroup parent, Executor executor) {
|
||||
super(parent, executor, true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user