Added config SI for io.netty.util.Timer and config module wrapper for HashedWheelTime...
[controller.git] / opendaylight / config / netty-event-executor-config / src / main / java / org / opendaylight / controller / config / yang / netty / eventexecutor / GlobalEventExecutorModule.java
1 /**
2  * Generated file
3
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
7  *
8  * Do not modify this file unless it is present under src/main directory
9  */
10 package org.opendaylight.controller.config.yang.netty.eventexecutor;
11
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;
17
18 import java.util.concurrent.TimeUnit;
19
20 /**
21 *
22 */
23 public final class GlobalEventExecutorModule extends
24         org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModule {
25
26     public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
27             org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
28         super(identifier, dependencyResolver);
29     }
30
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);
35     }
36
37     @Override
38     public void validate() {
39         super.validate();
40     }
41
42     @Override
43     public java.lang.AutoCloseable createInstance() {
44         return new GlobalEventExecutorCloseable(GlobalEventExecutor.INSTANCE);
45     }
46
47     static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
48
49         private EventExecutor executor;
50
51         public GlobalEventExecutorCloseable(EventExecutor executor) {
52             this.executor = executor;
53         }
54
55         @Override
56         public EventExecutorGroup parent() {
57             return this.executor.parent();
58         }
59
60         @Override
61         public boolean inEventLoop(Thread thread) {
62             return this.executor.inEventLoop(thread);
63         }
64
65         @Override
66         public boolean isShuttingDown() {
67             return this.executor.isShuttingDown();
68         }
69
70         @Override
71         public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
72             return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
73         }
74
75         @Override
76         public Future<?> terminationFuture() {
77             return this.executor.terminationFuture();
78         }
79
80         @Override
81         public boolean isShutdown() {
82             return this.executor.isShutdown();
83         }
84
85         @Override
86         public boolean isTerminated() {
87             return this.executor.isTerminated();
88         }
89
90         @Override
91         public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
92             return this.executor.awaitTermination(timeout, unit);
93         }
94
95         @Override
96         public void execute(Runnable command) {
97             this.executor.execute(command);
98         }
99
100         @Override
101         public void close() throws Exception {
102             shutdownGracefully();
103         }
104
105         @SuppressWarnings("deprecation")
106         @Override
107         public void shutdown() {
108             this.executor.shutdown();
109         }
110
111     }
112 }