Applications of idempotent methods

The characteristic of an idempotent operation in programming is that any multiple executions of it have the same effect as a single execution.

An idempotent function, or idempotent method, is a function that can be executed repeatedly with the same parameters and achieve the same result. These functions do not affect the system state, and there is no need to worry that repeated execution will cause changes to the system.

More complex operations are guaranteed to be idempotent using unique transaction numbers (serial numbers).

In HTTP, PUT is defined as an idempotent method, POST is not.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325816781&siteId=291194637