4 * Generated from: yang module name: netty-event-executor yang module local name: netty-global-event-executor
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Tue Nov 12 10:44:21 CET 2013
8 * Do not modify this file unless it is present under src/main directory
10 package org.opendaylight.controller.config.yang.netty.eventexecutor;
12 import io.netty.util.concurrent.AbstractEventExecutor;
13 import io.netty.util.concurrent.EventExecutor;
14 import io.netty.util.concurrent.EventExecutorGroup;
15 import io.netty.util.concurrent.Future;
16 import io.netty.util.concurrent.GlobalEventExecutor;
18 import java.util.concurrent.TimeUnit;
23 public final class GlobalEventExecutorModule extends
24 org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModule {
26 public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
27 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
28 super(identifier, dependencyResolver);
31 public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
32 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
33 GlobalEventExecutorModule oldModule, java.lang.AutoCloseable oldInstance) {
34 super(identifier, dependencyResolver, oldModule, oldInstance);
38 public void validate() {
40 // Add custom validation for module attributes here.
44 public java.lang.AutoCloseable createInstance() {
45 return new GlobalEventExecutorCloseable(GlobalEventExecutor.INSTANCE);
48 static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
50 private EventExecutor executor;
52 public GlobalEventExecutorCloseable(EventExecutor executor) {
53 this.executor = executor;
57 public EventExecutorGroup parent() {
58 return this.executor.parent();
62 public boolean inEventLoop(Thread thread) {
63 return this.executor.inEventLoop(thread);
67 public boolean isShuttingDown() {
68 return this.executor.isShuttingDown();
72 public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
73 return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
77 public Future<?> terminationFuture() {
78 return this.executor.terminationFuture();
82 public boolean isShutdown() {
83 return this.executor.isShutdown();
87 public boolean isTerminated() {
88 return this.executor.isTerminated();
92 public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
93 return this.executor.awaitTermination(timeout, unit);
97 public void execute(Runnable command) {
98 this.executor.execute(command);
102 public void close() throws Exception {
103 shutdownGracefully();
106 @SuppressWarnings("deprecation")
108 public void shutdown() {
109 this.executor.shutdown();