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