class MembershipWaiter {

    CompletableFuture<Boolean> waitUntilCaughtUpMember( RaftMachine raft )
    {
        CompletableFuture<Boolean> catchUpFuture = new CompletableFuture<>();

        Evaluator evaluator = new Evaluator( raft, catchUpFuture, dbHealthSupplier );

        JobHandle jobHandle = jobScheduler.schedule( Group.MEMBERSHIP_WAITER,
                evaluator, currentCatchupDelayInMs, MILLISECONDS );

        catchUpFuture.whenComplete( ( result, e ) -> jobHandle.cancel( true ) );

        return catchUpFuture;
    }

    public  MembershipWaiter( MemberId myself, JobScheduler jobScheduler, Supplier<DatabaseHealth> dbHealthSupplier,
            long maxCatchupLag, LogProvider logProvider, Monitors monitors );

}