clean thread pool interface
This commit is contained in:
parent
f09a66bf12
commit
f7aee2a423
|
@ -21,7 +21,6 @@ package org.elasticsearch.threadpool;
|
|||
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -101,12 +100,6 @@ public interface ThreadPool extends Executor {
|
|||
|
||||
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit);
|
||||
|
||||
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit);
|
||||
|
||||
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit);
|
||||
|
||||
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit);
|
||||
|
||||
public ScheduledFuture<?> schedule(Runnable command, TimeValue delay);
|
||||
|
||||
ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, TimeValue interval);
|
||||
|
|
|
@ -68,20 +68,8 @@ public abstract class AbstractThreadPool extends AbstractComponent implements Th
|
|||
return scheduledExecutorService.schedule(command, delay, unit);
|
||||
}
|
||||
|
||||
@Override public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
|
||||
return scheduledExecutorService.schedule(callable, delay, unit);
|
||||
}
|
||||
|
||||
@Override public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
|
||||
return scheduledExecutorService.scheduleAtFixedRate(command, initialDelay, period, unit);
|
||||
}
|
||||
|
||||
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
|
||||
return scheduledExecutorService.scheduleWithFixedDelay(command, initialDelay, delay, unit);
|
||||
}
|
||||
|
||||
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, TimeValue interval) {
|
||||
return scheduleWithFixedDelay(command, interval.millis(), interval.millis(), TimeUnit.MILLISECONDS);
|
||||
return scheduledExecutorService.scheduleWithFixedDelay(command, interval.millis(), interval.millis(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
@Override public void shutdown() {
|
||||
|
|
Loading…
Reference in New Issue