Watcher: Remove TriggerEngine.getJobCount() (#30395)
Since adding back the per-watch statistics, we do not need to access every trigger engine implementation to get the current total job count. This commit removes the unused methods to do so.
This commit is contained in:
parent
0ff8cf48e8
commit
ed2d427c48
|
@ -511,7 +511,7 @@ public class HttpRequest implements ToXContentObject {
|
|||
* @param params The ToXContentParams from the parent write
|
||||
* @param excludeField The field to exclude
|
||||
* @return A bytearrayinputstream that contains the serialized request
|
||||
* @throws IOException
|
||||
* @throws IOException if an IOException is triggered in the underlying toXContent method
|
||||
*/
|
||||
public static InputStream filterToXContent(HttpRequest request, XContent xContent, ToXContent.Params params,
|
||||
String excludeField) throws IOException {
|
||||
|
|
|
@ -37,11 +37,6 @@ public interface TriggerEngine<T extends Trigger, E extends TriggerEvent> {
|
|||
*/
|
||||
void pauseExecution();
|
||||
|
||||
/**
|
||||
* Returns the number of active jobs currently in this trigger engine implementation
|
||||
*/
|
||||
int getJobCount();
|
||||
|
||||
/**
|
||||
* Removes the job associated with the given name from this trigger engine.
|
||||
*
|
||||
|
|
|
@ -52,11 +52,6 @@ public class ManualTriggerEngine implements TriggerEngine<ManualTrigger, ManualT
|
|||
public void pauseExecution() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJobCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(String jobId) {
|
||||
return false;
|
||||
|
|
|
@ -77,11 +77,6 @@ public class TickerScheduleTriggerEngine extends ScheduleTriggerEngine {
|
|||
schedules.put(watch.id(), new ActiveSchedule(watch.id(), trigger.getSchedule(), clock.millis()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJobCount() {
|
||||
return schedules.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(String jobId) {
|
||||
return schedules.remove(jobId) != null;
|
||||
|
|
|
@ -71,11 +71,6 @@ public class ScheduleTriggerEngineMock extends ScheduleTriggerEngine {
|
|||
watches.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJobCount() {
|
||||
return watches.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(String jobId) {
|
||||
return watches.remove(jobId) != null;
|
||||
|
|
|
@ -671,11 +671,6 @@ public class WatchTests extends ESTestCase {
|
|||
public void pauseExecution() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJobCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(String jobId) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue