org.apache.ignite.configuration

## Class AtomicConfiguration

- java.lang.Object
- - org.apache.ignite.configuration.AtomicConfiguration

-     public class AtomicConfiguration
      extends Object

  Configuration for atomic data structures.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE` Default atomic sequence reservation size.
    `static int` | `DFLT_BACKUPS`
    `static CacheMode` | `DFLT_CACHE_MODE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AtomicConfiguration()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AffinityFunction` | `getAffinity()` Gets atomic cache affinity function.
    `int` | `getAtomicSequenceReserveSize()` Gets default number of sequence values reserved for `IgniteAtomicSequence` instances.
    `int` | `getBackups()`
    `CacheMode` | `getCacheMode()`
    `String` | `getGroupName()`
    `AtomicConfiguration` | `setAffinity(AffinityFunction aff)` Sets atomic cache affinity function.
    `AtomicConfiguration` | `setAtomicSequenceReserveSize(int seqReserveSize)` Sets default number of sequence values reserved for `IgniteAtomicSequence` instances.
    `AtomicConfiguration` | `setBackups(int backups)`
    `AtomicConfiguration` | `setCacheMode(CacheMode cacheMode)`
    `AtomicConfiguration` | `setGroupName(String grpName)`
    `String` | `toString()`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DFLT_BACKUPS

          public static final int DFLT_BACKUPS

      See Also:
        Constant Field Values

    - #### DFLT_CACHE_MODE

          public static final CacheMode DFLT_CACHE_MODE

    - #### DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE

          public static final int DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE

      Default atomic sequence reservation size.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AtomicConfiguration

          public AtomicConfiguration()

  - ### Method Detail

    - #### getBackups

          public int getBackups()

      Returns:
        Number of backup nodes.

    - #### setBackups

          public AtomicConfiguration setBackups(int backups)

      Parameters:
        `backups` - Number of backup nodes.
      Returns:
        `this` for chaining.

    - #### getCacheMode

          public CacheMode getCacheMode()

      Returns:
        Cache mode.

    - #### setCacheMode

          public AtomicConfiguration setCacheMode(CacheMode cacheMode)

      Parameters:
        `cacheMode` - Cache mode.
      Returns:
        `this` for chaining.

    - #### getAtomicSequenceReserveSize

          public int getAtomicSequenceReserveSize()

      Gets default number of sequence values reserved for `IgniteAtomicSequence` instances. After a certain number has been reserved, consequent increments of sequence will happen locally, without communication with other nodes, until the next reservation has to be made.

      Default value is `DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE`.

      Returns:
        Atomic sequence reservation size.

    - #### setAtomicSequenceReserveSize

          public AtomicConfiguration setAtomicSequenceReserveSize(int seqReserveSize)

      Sets default number of sequence values reserved for `IgniteAtomicSequence` instances. After a certain number has been reserved, consequent increments of sequence will happen locally, without communication with other nodes, until the next reservation has to be made.
      Parameters:
        `seqReserveSize` - Atomic sequence reservation size.
      Returns:
        `this` for chaining.
      See Also:
        `getAtomicSequenceReserveSize()`

    - #### getAffinity

          public AffinityFunction getAffinity()

      Gets atomic cache affinity function.
      Returns:
        Affinity function or null, if not set.

    - #### setAffinity

          public AtomicConfiguration setAffinity(AffinityFunction aff)

      Sets atomic cache affinity function.
      Parameters:
        `aff` - Affinity function.
      Returns:
        `this` for chaining.

    - #### getGroupName

          public String getGroupName()

      Returns:
        Group name.

    - #### setGroupName

          public AtomicConfiguration setGroupName(String grpName)

      Parameters:
        `grpName` - Group name.
      Returns:
        `this` for chaining.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022