Ice Reference Documentation
<<< Previous | Slice Documentation | Next >>>

# `Ice::OperationMode`

## Overview

    enum OperationMode

The OperationMode determines the skeleton signature (for C++), as well as the retry behavior of the Ice run time for an operation invocation in case of a (potentially) recoverable error.

### Used By

Current::mode

### Enumerator Index

`Normal`

  Ordinary operations have `Normal` mode.

`Nonmutating`

  Operations that use the Slice `Nonmutating` keyword must not modify object state.

`Idempotent`

  Operations that use the Slice `Idempotent` keyword can modify object state, but invoking an operation twice in a row must result in the same object state as invoking it once.

## `Normal`

    Normal

Ordinary operations have `Normal` mode. These operations modify object state; invoking such an operation twice in a row has different semantics than invoking it once. The Ice run time guarantees that it will not violate at-most-once semantics for `Normal` operations.

## `Nonmutating`

    Nonmutating

Operations that use the Slice `Nonmutating` keyword must not modify object state. For C++, nonmutating operations generate `const` member functions in the skeleton. In addition, the Ice run time will attempt to transparently recover from certain run-time errors by re-issuing a failed request and propagate the failure to the application only if the second attempt fails.

## `Idempotent`

    Idempotent

Operations that use the Slice `Idempotent` keyword can modify object state, but invoking an operation twice in a row must result in the same object state as invoking it once. For example, `x = 1` is an idempotent statement, whereas `x += 1` is not. For idempotent operations, the Ice run-time uses the same retry behavior as for nonmutating operations in case of a potentially recoverable error.

<<< Previous | Home | Next >>>
`Ice::ObjectNotFoundException` | Up | `Ice::OperationNotExistException`