- static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
-
- private EventExecutor executor;
-
- public GlobalEventExecutorCloseable(EventExecutor executor) {
- this.executor = executor;
- }
-
- @Override
- public EventExecutorGroup parent() {
- return this.executor.parent();
- }
-
- @Override
- public boolean inEventLoop(Thread thread) {
- return this.executor.inEventLoop(thread);
- }
-
- @Override
- public boolean isShuttingDown() {
- return this.executor.isShuttingDown();
- }
-
- @Override
- public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
- return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
- }
-
- @Override
- public Future<?> terminationFuture() {
- return this.executor.terminationFuture();
- }
-
- @Override
- public boolean isShutdown() {
- return this.executor.isShutdown();
- }
-
- @Override
- public boolean isTerminated() {
- return this.executor.isTerminated();
- }
-
- @Override
- public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
- return this.executor.awaitTermination(timeout, unit);
- }
-
- @Override
- public void execute(Runnable command) {
- this.executor.execute(command);
- }
-
- @Override
- public void close() throws Exception {
- shutdownGracefully();
- }
-
- @SuppressWarnings("deprecation")
- @Override
- public void shutdown() {
- this.executor.shutdown();
- }
-