ConfigurationService to create default config dir
[controller.git] / opendaylight / config / netty-event-executor-config / src / main / java / org / opendaylight / controller / config / yang / netty / eventexecutor / GlobalEventExecutorModule.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 /**
10  * Generated file
11
12  * Generated from: yang module name: netty-event-executor  yang module local name: netty-global-event-executor
13  * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
14  * Generated at: Tue Nov 12 10:44:21 CET 2013
15  *
16  * Do not modify this file unless it is present under src/main directory
17  */
18 package org.opendaylight.controller.config.yang.netty.eventexecutor;
19
20 import io.netty.util.concurrent.AbstractEventExecutor;
21 import io.netty.util.concurrent.EventExecutor;
22 import io.netty.util.concurrent.EventExecutorGroup;
23 import io.netty.util.concurrent.Future;
24 import io.netty.util.concurrent.GlobalEventExecutor;
25 import io.netty.util.concurrent.ScheduledFuture;
26
27 import java.util.concurrent.Callable;
28 import java.util.concurrent.TimeUnit;
29
30 /**
31 *
32 */
33 public final class GlobalEventExecutorModule extends
34         org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModule {
35
36     public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
37             org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
38         super(identifier, dependencyResolver);
39     }
40
41     public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
42             org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
43             GlobalEventExecutorModule oldModule, java.lang.AutoCloseable oldInstance) {
44         super(identifier, dependencyResolver, oldModule, oldInstance);
45     }
46
47     @Override
48     public void validate() {
49         super.validate();
50     }
51
52     @Override
53     public java.lang.AutoCloseable createInstance() {
54         return new GlobalEventExecutorCloseable(GlobalEventExecutor.INSTANCE);
55     }
56
57     static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
58
59         private EventExecutor executor;
60
61         public GlobalEventExecutorCloseable(EventExecutor executor) {
62             this.executor = executor;
63         }
64
65         @Override
66         public EventExecutorGroup parent() {
67             return this.executor.parent();
68         }
69
70         @Override
71         public boolean inEventLoop(Thread thread) {
72             return this.executor.inEventLoop(thread);
73         }
74
75         @Override
76         public boolean isShuttingDown() {
77             return this.executor.isShuttingDown();
78         }
79
80         @Override
81         public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
82             return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
83         }
84
85         @Override
86         public Future<?> terminationFuture() {
87             return this.executor.terminationFuture();
88         }
89
90         @Override
91         public boolean isShutdown() {
92             return this.executor.isShutdown();
93         }
94
95         @Override
96         public boolean isTerminated() {
97             return this.executor.isTerminated();
98         }
99
100         @Override
101         public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
102             return this.executor.awaitTermination(timeout, unit);
103         }
104
105         @Override
106         public void execute(Runnable command) {
107             this.executor.execute(command);
108         }
109
110         @Override
111         public void close() throws Exception {
112             shutdownGracefully();
113         }
114
115         @SuppressWarnings("deprecation")
116         @Override
117         public void shutdown() {
118             this.executor.shutdown();
119         }
120
121         @Override
122         public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
123             return this.executor.scheduleWithFixedDelay(command, initialDelay, delay, unit);
124         }
125
126         @Override
127         public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
128             return this.executor.schedule(command, delay, unit);
129         }
130
131         @Override
132         public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
133             return this.executor.schedule(callable, delay, unit);
134         }
135
136         @Override
137         public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
138             return this.executor.scheduleAtFixedRate(command, initialDelay, period, unit);
139         }
140     }
141 }