Skip to content

Commit

Permalink
use default empty implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
idegtiarenko committed Oct 26, 2023
1 parent e0002b2 commit 6bc84bd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,6 @@ public void onTaskRegistered(Task task) {
}
}
}

@Override
public void onTaskUnregistered(Task task) {}
});
}
// Need to run the task in a separate thread because node client's .execute() is blocked by our task listener
Expand Down Expand Up @@ -601,9 +598,6 @@ private <T> void waitForCompletionTestCase(boolean storeResult, Function<TaskId,
CountDownLatch waitForWaitingToStart = new CountDownLatch(1);
for (TransportService transportService : internalCluster().getInstances(TransportService.class)) {
((MockTaskManager) transportService.getTaskManager()).addListener(new MockTaskManagerListener() {
@Override
public void onTaskRegistered(Task task) {}

@Override
public void onTaskUnregistered(Task task) {
waitForWaitingToStart.countDown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ public void testCreatesChildTaskForPublishingClusterState() throws Exception {
public void onTaskRegistered(Task task) {
registeredActions.add(task.getAction());
}

@Override
public void onTaskUnregistered(Task task) {}
});

final CountDownLatch latch = new CountDownLatch(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* Listener for task registration/unregistration
*/
public interface MockTaskManagerListener {
void onTaskRegistered(Task task);
default void onTaskRegistered(Task task) {};

void onTaskUnregistered(Task task);
default void onTaskUnregistered(Task task) {};

default void subscribeForRemovedTasks(RemovedTaskListener removedTaskListener) {}
}

0 comments on commit 6bc84bd

Please sign in to comment.