Class AsyncIdempotencyPolicy (3.8.0-rc)
Stay organized with collections
Save and categorize content based on your preferences.
Define the interface for the AsyncClient's idempotency policy.
The idempotency policy controls which requests are treated as idempotent and therefore safe to retry on a transient failure. Retrying non-idempotent operations can result in data loss.
Consider, for example, DeleteObject(). If this operation is called without pre-conditions retrying it may delete more than one version of an object.
Even operations that "add" data can result in data loss. Consider, as another example, inserting a new object. If called without pre-conditions retrying this operation will insert multiple new versions. If the bucket is configured to only keep the last N versions of each object, then the retry would have deleted more data than desired.
Some applications are designed to handle duplicate requests without data loss, or the library may be used in an environment where the risk of data loss due to duplicate requests is negligible or zero.
This policy allows application developers to control the behavior of the library with respect to retrying non-idempotent operations. Application developers can configure the library to only retry operations that are known to be idempotent (that is, they will succeed only once). Application may also configure the library to retry all operations, regardless of whether the operations are idempotent or not.