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;
17 import io.netty.util.concurrent.ScheduledFuture;
19 import java.util.concurrent.Callable;
20 import java.util.concurrent.TimeUnit;
25 public final class GlobalEventExecutorModule extends
26 org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModule {
28 public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
29 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
30 super(identifier, dependencyResolver);
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);
40 public void validate() {
45 public java.lang.AutoCloseable createInstance() {
46 return new GlobalEventExecutorCloseable(GlobalEventExecutor.INSTANCE);
49 static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
51 private EventExecutor executor;
53 public GlobalEventExecutorCloseable(EventExecutor executor) {
54 this.executor = executor;
58 public EventExecutorGroup parent() {
59 return this.executor.parent();
63 public boolean inEventLoop(Thread thread) {
64 return this.executor.inEventLoop(thread);
68 public boolean isShuttingDown() {
69 return this.executor.isShuttingDown();
73 public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
74 return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
78 public Future<?> terminationFuture() {
79 return this.executor.terminationFuture();
83 public boolean isShutdown() {
84 return this.executor.isShutdown();
88 public boolean isTerminated() {
89 return this.executor.isTerminated();
93 public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
94 return this.executor.awaitTermination(timeout, unit);
98 public void execute(Runnable command) {
99 this.executor.execute(command);
103 public void close() throws Exception {
104 shutdownGracefully();
107 @SuppressWarnings("deprecation")
109 public void shutdown() {
110 this.executor.shutdown();
114 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
115 return this.executor.scheduleWithFixedDelay(command, initialDelay, delay, unit);
119 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
120 return this.executor.schedule(command, delay, unit);
124 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
125 return this.executor.schedule(callable, delay, unit);
129 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
130 return this.executor.scheduleAtFixedRate(command, initialDelay, period, unit);