Merge "Bring some reliability in the eclipse and maven mixed builds"
[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         // Add custom validation for module attributes here.
41     }
42
43     @Override
44     public java.lang.AutoCloseable createInstance() {
45         return new GlobalEventExecutorCloseable(GlobalEventExecutor.INSTANCE);
46     }
47
48     static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
49
50         private EventExecutor executor;
51
52         public GlobalEventExecutorCloseable(EventExecutor executor) {
53             this.executor = executor;
54         }
55
56         @Override
57         public EventExecutorGroup parent() {
58             return this.executor.parent();
59         }
60
61         @Override
62         public boolean inEventLoop(Thread thread) {
63             return this.executor.inEventLoop(thread);
64         }
65
66         @Override
67         public boolean isShuttingDown() {
68             return this.executor.isShuttingDown();
69         }
70
71         @Override
72         public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
73             return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
74         }
75
76         @Override
77         public Future<?> terminationFuture() {
78             return this.executor.terminationFuture();
79         }
80
81         @Override
82         public boolean isShutdown() {
83             return this.executor.isShutdown();
84         }
85
86         @Override
87         public boolean isTerminated() {
88             return this.executor.isTerminated();
89         }
90
91         @Override
92         public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
93             return this.executor.awaitTermination(timeout, unit);
94         }
95
96         @Override
97         public void execute(Runnable command) {
98             this.executor.execute(command);
99         }
100
101         @Override
102         public void close() throws Exception {
103             shutdownGracefully();
104         }
105
106         @SuppressWarnings("deprecation")
107         @Override
108         public void shutdown() {
109             this.executor.shutdown();
110         }
111
112     }
113 }