code: public RetryTemplateBuilder maxAttempts(int maxAttempts) {
  		Assert.isTrue(maxAttempts > 0, "Number of attempts should be positive");
  		Assert.isNull(this.baseRetryPolicy,
  				"You have already selected another retry policy");
  		this.baseRetryPolicy = new MaxAttemptsRetryPolicy(maxAttempts);
  		return this;
  	}
docs: Limits maximum number of attempts to provided value.
  <p>
  Invocation of this method does not discard default exception classification rule,
  that is "retry only on {@link Exception} and it's subclasses".
  @param maxAttempts includes initial attempt and all retries. E.g: maxAttempts = 3
  means one initial attempt and two retries.
  @return this
  @see MaxAttemptsRetryPolicy