org.apache.ignite.cache

## Enum CacheAtomicWriteOrderMode

- java.lang.Object
- - java.lang.Enum<CacheAtomicWriteOrderMode>
  - - org.apache.ignite.cache.CacheAtomicWriteOrderMode

All Implemented Interfaces:
  Serializable, Comparable<CacheAtomicWriteOrderMode>

    public enum CacheAtomicWriteOrderMode
    extends Enum<CacheAtomicWriteOrderMode>

Cache write ordering mode. This enumeration is taken into account only in `CacheAtomicityMode.ATOMIC` atomicity mode. Write ordering mode determines which node assigns the write version, sender or the primary node.

For example, `CLOCK` mode assigns write versions on a sender node which generally leads to better performance in `CacheWriteSynchronizationMode.FULL_SYNC` synchronization mode, since in this case sender can send write requests to primary and backups at the same time. Otherwise, if ordering mode is `PRIMARY`, it would only send request to primary node, which in turn will assign write version and forward it to backups.

`CLOCK` mode will be automatically configured only with `CacheWriteSynchronizationMode.FULL_SYNC` write synchronization mode, as for other synchronization modes it does not render better performance.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`CLOCK` In this mode, write versions are assigned on a sender node which generally leads to better performance in `CacheWriteSynchronizationMode.FULL_SYNC` synchronization mode, since in this case sender can send write requests to primary and backups at the same time.
`PRIMARY` Cache version is assigned only on primary node.

### Method Summary

Methods
`static CacheAtomicWriteOrderMode` `fromOrdinal(byte ord)` Efficiently gets enumerated value from its ordinal.
`static CacheAtomicWriteOrderMode` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static CacheAtomicWriteOrderMode[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### CLOCK

    public static final CacheAtomicWriteOrderMode CLOCK

In this mode, write versions are assigned on a sender node which generally leads to better performance in `CacheWriteSynchronizationMode.FULL_SYNC` synchronization mode, since in this case sender can send write requests to primary and backups at the same time.

This mode will be automatically configured only with `CacheWriteSynchronizationMode.FULL_SYNC` write synchronization mode, as for other synchronization modes it does not render better performance.

#### PRIMARY

    public static final CacheAtomicWriteOrderMode PRIMARY

Cache version is assigned only on primary node. This means that sender will only send write request to primary node, which in turn will assign write version and forward it to backups.

### Method Detail

#### values

    public static CacheAtomicWriteOrderMode[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (CacheAtomicWriteOrderMode c : CacheAtomicWriteOrderMode.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static CacheAtomicWriteOrderMode valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

#### fromOrdinal

    @Nullable
    public static CacheAtomicWriteOrderMode fromOrdinal(byte ord)

Efficiently gets enumerated value from its ordinal.

Parameters:
  `ord` - Ordinal value.
Returns:
  Enumerated value or `null` if ordinal out of range.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015