1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.util.concurrent;
17
18 import java.util.Collection;
19 import java.util.Collections;
20 import java.util.List;
21 import java.util.concurrent.Callable;
22 import java.util.concurrent.ExecutionException;
23 import java.util.concurrent.TimeUnit;
24 import java.util.concurrent.TimeoutException;
25
26
27
28
29
30 public abstract class AbstractEventExecutorGroup implements EventExecutorGroup {
31
32 @Override
33 public Future<?> submit(Runnable task) {
34 return next().submit(task);
35 }
36
37 @Override
38 public <T> Future<T> submit(Runnable task, T result) {
39 return next().submit(task, result);
40 }
41
42 @Override
43 public <T> Future<T> submit(Callable<T> task) {
44 return next().submit(task);
45 }
46
47 @Override
48 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
49 return next().schedule(command, delay, unit);
50 }
51
52 @Override
53 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
54 return next().schedule(callable, delay, unit);
55 }
56
57 @Override
58 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
59 return next().scheduleAtFixedRate(command, initialDelay, period, unit);
60 }
61
62 @Override
63 public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
64 return next().scheduleWithFixedDelay(command, initialDelay, delay, unit);
65 }
66
67 @Override
68 public Future<?> shutdownGracefully() {
69 return shutdownGracefully(2, 15, TimeUnit.SECONDS);
70 }
71
72
73
74
75 @Override
76 @Deprecated
77 public abstract void shutdown();
78
79
80
81
82 @Override
83 @Deprecated
84 public List<Runnable> shutdownNow() {
85 shutdown();
86 return Collections.emptyList();
87 }
88
89 @Override
90 public <T> List<java.util.concurrent.Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
91 throws InterruptedException {
92 return next().invokeAll(tasks);
93 }
94
95 @Override
96 public <T> List<java.util.concurrent.Future<T>> invokeAll(
97 Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException {
98 return next().invokeAll(tasks, timeout, unit);
99 }
100
101 @Override
102 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException {
103 return next().invokeAny(tasks);
104 }
105
106 @Override
107 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
108 throws InterruptedException, ExecutionException, TimeoutException {
109 return next().invokeAny(tasks, timeout, unit);
110 }
111
112 @Override
113 public void execute(Runnable command) {
114 next().execute(command);
115 }
116 }