code: public Waiter<DescribeTasksRequest> tasksStopped() {
  
          return new WaiterBuilder<DescribeTasksRequest, DescribeTasksResult>().withSdkFunction(new DescribeTasksFunction(client))
                  .withAcceptors(new TasksStopped.IsSTOPPEDMatcher())
                  .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(100), new FixedDelayStrategy(6)))
                  .withExecutorService(executorService).build();
      }
docs: Builds a TasksStopped waiter by using custom parameters waiterParameters and other parameters defined in the
  waiters specification, and then polls until it determines whether the resource entered the desired state or not,
  where polling criteria is bound by either default polling strategy or custom polling strategy.