idempotent attribute
The [idempotent] attribute specifies that an operation does not modify state information and returns the same results each time it is performed. Performing the routine more than once has the same effect as performing it once.
[
interface-attribute-list
]
interface interface-name
{
[idempotent [, attribute-list]] returntype function-name(params)
}
Parameters
-
interface-attribute-list
-
Specifies a list of zero or more IDL attributes that apply to the interface as a whole. When two or more interface attributes are present, they must be separated by commas.
-
interface-name
-
Specifies the name of the interface.
-
attribute-list
-
Specifies additional attributes to be applied to the function. Separate multiple attributes with commas.
-
returntype
-
Specifies the return type of the function.
-
function-name
-
Specifies the name of the function to which the [idempotent] attribute will be applied.
-
params
-
Function parameter list.
Remarks
RPC supports two types of remote call semantics: calls to operations with the [idempotent] attribute and calls to operations (idempotent operations) without the [idempotent] attribute (non-idempotent operations). An idempotent operation can be carried out more than once with no ill effect. Conversely, a non-idempotent operation cannot be executed more than once because it will either return different results each time or because it modifies some state.
To ensure that a procedure is automatically re-executed if the call does not complete, use the [idempotent] attribute. If the [idempotent], [broadcast], or [maybe] attributes are not present, the procedure will use non-idempotent semantics by default. In this case, the operation is executed only once.
See also