- protected abstract @Nonnull C cloneAsVersion(@Nonnull ABIVersion version);
-
- /**
- * Return a message which will have the retry counter incremented by one.
- *
- * @return A message with the specified retry counter
- */
- public final @Nonnull C incrementRetry() {
- return Verify.verifyNotNull(cloneAsRetry(retry +1));
- }
-
- /**
- * Create a copy of this message which will have its retry count bumped. This method should be implemented by
- * the concrete final message class and should invoked the equivalent of {@link #Message(Message, long)}.
- *
- * @param retry new retry count
- * @return A message with the specified retry counter
- */
- protected abstract @Nonnull C cloneAsRetry(long retry);