Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watcher: Remove TriggerEngine.getJobCount() #30395

Merged
merged 4 commits into from
May 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public interface Field {
* @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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ public void add(Watch job) {
public void pauseExecution() {
}

@Override
public int getJobCount() {
return 0;
}

@Override
public boolean remove(String jobId) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ public void add(Watch watch) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ public void pauseExecution() {
watches.clear();
}

@Override
public int getJobCount() {
return watches.size();
}

@Override
public boolean remove(String jobId) {
return watches.remove(jobId) != null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,6 @@ public void add(Watch watch) {
public void pauseExecution() {
}

@Override
public int getJobCount() {
return 0;
}

@Override
public boolean remove(String jobId) {
return false;
Expand Down