All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Ice.OperationMode Maven / Gradle / Ivy

Go to download

Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms

The newest version!
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.10
//
// 
//
// Generated from file `Current.ice'
//
// Warning: do not edit this file.
//
// 
//

package Ice;

/**
 * Determines the retry behavior an invocation in case of a (potentially) recoverable error.
 *
 **/
public enum OperationMode implements java.io.Serializable
{
    /**
     * 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.
     **/
    Normal(0),

    /**
     * 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.
     *
     * 

Nonmutating is deprecated; Use the * idempotent keyword instead. For C++, to retain the mapping * of nonmutating operations to C++ const * member functions, use the ["cpp:const"] metadata * directive. **/ Nonmutating(1), /** * 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. **/ Idempotent(2); public int value() { return _value; } public static OperationMode valueOf(int v) { switch(v) { case 0: return Normal; case 1: return Nonmutating; case 2: return Idempotent; } return null; } private OperationMode(int v) { _value = v; } public void ice_write(OutputStream ostr) { ostr.writeEnum(_value, 2); } public static void ice_write(OutputStream ostr, OperationMode v) { if(v == null) { ostr.writeEnum(Ice.OperationMode.Normal.value(), 2); } else { ostr.writeEnum(v.value(), 2); } } public static OperationMode ice_read(InputStream istr) { int v = istr.readEnum(2); return validate(v); } private static OperationMode validate(int v) { final OperationMode e = valueOf(v); if(e == null) { throw new MarshalException("enumerator value " + v + " is out of range"); } return e; } private final int _value; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy