public static AsyncLeadershipObserver create() { /** * This executor should be kept single threaded to ensure ordered execution of tasks * which is guaranteed by the API contract of {@link LeadershipObserver} */ return new AsyncLeadershipObserver(PTExecutors.newSingleThreadExecutor(true)); }
@Before public void setUp() { leadershipObserver = new AsyncLeadershipObserver(executorService); }
public static AsyncLeadershipObserver create() { /** * This executor should be kept single threaded to ensure ordered execution of tasks * which is guaranteed by the API contract of {@link LeadershipObserver} */ return new AsyncLeadershipObserver(PTExecutors.newSingleThreadExecutor(true)); }