parent
2127373bb2
commit
7981075f05
|
@ -33,8 +33,6 @@ import java.util.List;
|
|||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class HistoryService extends AbstractComponent {
|
||||
|
@ -99,12 +97,10 @@ public class HistoryService extends AbstractComponent {
|
|||
return started.get();
|
||||
}
|
||||
|
||||
// TODO: should be removed from the stats api? This is already visible in the thread pool cat api.
|
||||
public long queueSize() {
|
||||
return executor.queue().size();
|
||||
}
|
||||
|
||||
// TODO: should be removed from the stats api? This is already visible in the thread pool cat api.
|
||||
public long largestQueueSize() {
|
||||
return executor.largestPoolSize();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public class InternalWatchExecutor implements WatchExecutor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockingQueue queue() {
|
||||
public BlockingQueue<Runnable> queue() {
|
||||
return executor().getQueue();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.concurrent.BlockingQueue;
|
|||
*/
|
||||
public interface WatchExecutor {
|
||||
|
||||
BlockingQueue queue();
|
||||
BlockingQueue<Runnable> queue();
|
||||
|
||||
long largestPoolSize();
|
||||
|
||||
|
|
|
@ -101,8 +101,8 @@ public class TimeWarpedWatcherPlugin extends WatcherPlugin {
|
|||
public static class SameThreadExecutor implements WatchExecutor {
|
||||
|
||||
@Override
|
||||
public BlockingQueue queue() {
|
||||
return new ArrayBlockingQueue(1);
|
||||
public BlockingQueue<Runnable> queue() {
|
||||
return new ArrayBlockingQueue<>(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue