02cbd247a71db70f8dee044771eb904fa67b3b0b
[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 import io.netty.util.concurrent.ScheduledFuture;
18
19 import java.util.concurrent.Callable;
20 import java.util.concurrent.TimeUnit;
21
22 /**
23 *
24 */
25 public final class GlobalEventExecutorModule extends
26         org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModule {
27
28     public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
29             org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
30         super(identifier, dependencyResolver);
31     }
32
33     public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
34             org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
35             GlobalEventExecutorModule oldModule, java.lang.AutoCloseable oldInstance) {
36         super(identifier, dependencyResolver, oldModule, oldInstance);
37     }
38
39     @Override
40     public void validate() {
41         super.validate();
42     }
43
44     @Override
45     public java.lang.AutoCloseable createInstance() {
46         return new GlobalEventExecutorCloseable(GlobalEventExecutor.INSTANCE);
47     }
48
49     static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
50
51         private EventExecutor executor;
52
53         public GlobalEventExecutorCloseable(EventExecutor executor) {
54             this.executor = executor;
55         }
56
57         @Override
58         public EventExecutorGroup parent() {
59             return this.executor.parent();
60         }
61
62         @Override
63         public boolean inEventLoop(Thread thread) {
64             return this.executor.inEventLoop(thread);
65         }
66
67         @Override
68         public boolean isShuttingDown() {
69             return this.executor.isShuttingDown();
70         }
71
72         @Override
73         public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
74             return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
75         }
76
77         @Override
78         public Future<?> terminationFuture() {
79             return this.executor.terminationFuture();
80         }
81
82         @Override
83         public boolean isShutdown() {
84             return this.executor.isShutdown();
85         }
86
87         @Override
88         public boolean isTerminated() {
89             return this.executor.isTerminated();
90         }
91
92         @Override
93         public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
94             return this.executor.awaitTermination(timeout, unit);
95         }
96
97         @Override
98         public void execute(Runnable command) {
99             this.executor.execute(command);
100         }
101
102         @Override
103         public void close() throws Exception {
104             shutdownGracefully();
105         }
106
107         @SuppressWarnings("deprecation")
108         @Override
109         public void shutdown() {
110             this.executor.shutdown();
111         }
112
113         @Override
114         public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
115             return this.executor.scheduleWithFixedDelay(command, initialDelay, delay, unit);
116         }
117
118         @Override
119         public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
120             return this.executor.schedule(command, delay, unit);
121         }
122
123         @Override
124         public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
125             return this.executor.schedule(callable, delay, unit);
126         }
127
128         @Override
129         public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
130             return this.executor.scheduleAtFixedRate(command, initialDelay, period, unit);
131         }
132     }
133 }