Move private methods only used from inner classes to the inner classes
This commit is contained in:
parent
994a8db8fc
commit
57aa842b63
@ -110,28 +110,6 @@ public class AioEventLoopGroup extends MultithreadEventLoopGroup {
|
||||
return new AioEventLoop(this, threadFactory, scheduler);
|
||||
}
|
||||
|
||||
private void executeAioTask(Runnable command) {
|
||||
AbstractAioChannel ch = null;
|
||||
try {
|
||||
ch = CHANNEL_FINDER.findChannel(command);
|
||||
} catch (Throwable t) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
EventExecutor l;
|
||||
if (ch != null) {
|
||||
l = ch.eventLoop();
|
||||
} else {
|
||||
l = next();
|
||||
}
|
||||
|
||||
if (l.isShutdown()) {
|
||||
command.run();
|
||||
} else {
|
||||
l.execute(command);
|
||||
}
|
||||
}
|
||||
|
||||
private final class AioExecutorService extends AbstractExecutorService {
|
||||
|
||||
// It does not shut down the underlying EventExecutor - it merely pretends to be shut down.
|
||||
@ -173,5 +151,27 @@ public class AioEventLoopGroup extends MultithreadEventLoopGroup {
|
||||
next().execute(command);
|
||||
}
|
||||
}
|
||||
|
||||
private void executeAioTask(Runnable command) {
|
||||
AbstractAioChannel ch = null;
|
||||
try {
|
||||
ch = CHANNEL_FINDER.findChannel(command);
|
||||
} catch (Throwable t) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
EventExecutor l;
|
||||
if (ch != null) {
|
||||
l = ch.eventLoop();
|
||||
} else {
|
||||
l = next();
|
||||
}
|
||||
|
||||
if (l.isShutdown()) {
|
||||
command.run();
|
||||
} else {
|
||||
l.execute(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user