2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
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
16 * Do not modify this file unless it is present under src/main directory
18 package org.opendaylight.controller.config.yang.netty.eventexecutor;
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;
27 import java.util.concurrent.Callable;
28 import java.util.concurrent.TimeUnit;
33 public final class GlobalEventExecutorModule extends
34 org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModule {
36 public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
37 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
38 super(identifier, dependencyResolver);
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);
48 public void validate() {
53 public java.lang.AutoCloseable createInstance() {
54 return new GlobalEventExecutorCloseable(GlobalEventExecutor.INSTANCE);
57 static final private class GlobalEventExecutorCloseable extends AbstractEventExecutor implements AutoCloseable {
59 private EventExecutor executor;
61 public GlobalEventExecutorCloseable(EventExecutor executor) {
62 this.executor = executor;
66 public EventExecutorGroup parent() {
67 return this.executor.parent();
71 public boolean inEventLoop(Thread thread) {
72 return this.executor.inEventLoop(thread);
76 public boolean isShuttingDown() {
77 return this.executor.isShuttingDown();
81 public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
82 return this.executor.shutdownGracefully(quietPeriod, timeout, unit);
86 public Future<?> terminationFuture() {
87 return this.executor.terminationFuture();
91 public boolean isShutdown() {
92 return this.executor.isShutdown();
96 public boolean isTerminated() {
97 return this.executor.isTerminated();
101 public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
102 return this.executor.awaitTermination(timeout, unit);
106 public void execute(Runnable command) {
107 this.executor.execute(command);
111 public void close() throws Exception {
112 shutdownGracefully();
115 @SuppressWarnings("deprecation")
117 public void shutdown() {
118 this.executor.shutdown();
122 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
123 return this.executor.scheduleWithFixedDelay(command, initialDelay, delay, unit);
127 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
128 return this.executor.schedule(command, delay, unit);
132 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
133 return this.executor.schedule(callable, delay, unit);
137 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
138 return this.executor.scheduleAtFixedRate(command, initialDelay, period, unit);