the maximum time allowed before the policy expires, while the application can express this time in any units they desire, the class truncates to milliseconds.
typename DurationRep
a placeholder to match the Rep tparam for maximum_duration's type. The semantics of this template parameter are documented in std::chrono::duration<>. In brief, the underlying arithmetic type used to store the number of ticks. For our purposes it is simply a formal parameter.
typename DurationPeriod
a placeholder to match the Period tparam for maximum_duration's type. The semantics of this template parameter are documented in std::chrono::duration<>. In brief, the length of the tick in seconds, expressed as a std::ratio<>. For our purposes it is simply a formal parameter.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-22 UTC."],[[["\u003cp\u003eThis page details the \u003ccode\u003eLimitedTimeTransactionRerunPolicy\u003c/code\u003e class within the Google Cloud Spanner C++ client library, used to manage transaction retries based on elapsed time.\u003c/p\u003e\n"],["\u003cp\u003eThe policy stops retrying when it encounters a non-transient error or when the retry loop's duration exceeds a specified maximum.\u003c/p\u003e\n"],["\u003cp\u003eThe class constructor \u003ccode\u003eLimitedTimeTransactionRerunPolicy(std::chrono::duration< DurationRep, DurationPeriod >)\u003c/code\u003e sets the maximum time for retries, which is truncated to milliseconds.\u003c/p\u003e\n"],["\u003cp\u003eTransient errors that are covered under the policy are status codes \u003ccode\u003ekAborted\u003c/code\u003e and \u003ccode\u003ekNotFound\u003c/code\u003e if the error message indicates a missing spanner session.\u003c/p\u003e\n"],["\u003cp\u003eThe class also provides methods like \u003ccode\u003emaximum_duration()\u003c/code\u003e, \u003ccode\u003eOnFailure()\u003c/code\u003e, \u003ccode\u003eIsExhausted()\u003c/code\u003e, \u003ccode\u003eIsPermanentFailure()\u003c/code\u003e, and \u003ccode\u003eclone()\u003c/code\u003e to manage and query the retry policy's behavior and state, with several versions available starting from 2.11.0 up to 2.37.0-rc.\u003c/p\u003e\n"]]],[],null,[]]