code: private static boolean isRetryable(Throwable ex) {
          ex = Exceptions.unwrap(ex);
          return ex instanceof WriteFailureException
                  || ex instanceof DataLogNotAvailableException;
      }
docs: Determines whether the given exception can be retried.