org.apache.ignite.internal.processors.platform.cache.affinity

## Class PlatformAffinity

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.PlatformAbstractTarget
  - - org.apache.ignite.internal.processors.platform.cache.affinity.PlatformAffinity

All Implemented Interfaces:
  PlatformTarget

    public class PlatformAffinity
    extends PlatformAbstractTarget

Affinity wrapper for platforms.

### Field Summary

Fields
`static int` `OP_AFFINITY_KEY`
`static int` `OP_ALL_PARTITIONS`
`static int` `OP_BACKUP_PARTITIONS`
`static int` `OP_IS_BACKUP`
`static int` `OP_IS_PRIMARY`
`static int` `OP_IS_PRIMARY_OR_BACKUP`
`static int` `OP_MAP_KEY_TO_NODE`
`static int` `OP_MAP_KEY_TO_PRIMARY_AND_BACKUPS`
`static int` `OP_MAP_KEYS_TO_NODES`
`static int` `OP_MAP_PARTITION_TO_NODE`
`static int` `OP_MAP_PARTITION_TO_PRIMARY_AND_BACKUPS`
`static int` `OP_MAP_PARTITIONS_TO_NODES`
`static int` `OP_PARTITION`
`static int` `OP_PARTITIONS`
`static int` `OP_PRIMARY_PARTITIONS`

### Fields inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`ERROR, FALSE, log, platformCtx, TRUE`

### Constructor Summary

Constructors
Constructor and Description
`PlatformAffinity(PlatformContext platformCtx, @Nullable String name)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `processInLongOutLong(int type, long val)` Process IN operation.
`long` `processInStreamOutLong(int type, BinaryRawReaderEx reader)` Process IN operation.
`void` `processInStreamOutStream(int type, BinaryRawReaderEx reader, BinaryRawWriterEx writer)` Process IN-OUT operation.

### Methods inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`convertException, platformContext, processInObjectStreamOutObjectStream, processInStreamAsync, processInStreamOutLong, processInStreamOutObject, processOutObject, processOutStream, readAndListenFuture, readAndListenFuture, readAndListenFuture, throwUnsupported, wrapListenable`

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

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

### Field Detail

#### OP_AFFINITY_KEY

    public static final int OP_AFFINITY_KEY

See Also:
  Constant Field Values

#### OP_ALL_PARTITIONS

    public static final int OP_ALL_PARTITIONS

See Also:
  Constant Field Values

#### OP_BACKUP_PARTITIONS

    public static final int OP_BACKUP_PARTITIONS

See Also:
  Constant Field Values

#### OP_IS_BACKUP

    public static final int OP_IS_BACKUP

See Also:
  Constant Field Values

#### OP_IS_PRIMARY

    public static final int OP_IS_PRIMARY

See Also:
  Constant Field Values

#### OP_IS_PRIMARY_OR_BACKUP

    public static final int OP_IS_PRIMARY_OR_BACKUP

See Also:
  Constant Field Values

#### OP_MAP_KEY_TO_NODE

    public static final int OP_MAP_KEY_TO_NODE

See Also:
  Constant Field Values

#### OP_MAP_KEY_TO_PRIMARY_AND_BACKUPS

    public static final int OP_MAP_KEY_TO_PRIMARY_AND_BACKUPS

See Also:
  Constant Field Values

#### OP_MAP_KEYS_TO_NODES

    public static final int OP_MAP_KEYS_TO_NODES

See Also:
  Constant Field Values

#### OP_MAP_PARTITION_TO_NODE

    public static final int OP_MAP_PARTITION_TO_NODE

See Also:
  Constant Field Values

#### OP_MAP_PARTITION_TO_PRIMARY_AND_BACKUPS

    public static final int OP_MAP_PARTITION_TO_PRIMARY_AND_BACKUPS

See Also:
  Constant Field Values

#### OP_MAP_PARTITIONS_TO_NODES

    public static final int OP_MAP_PARTITIONS_TO_NODES

See Also:
  Constant Field Values

#### OP_PARTITION

    public static final int OP_PARTITION

See Also:
  Constant Field Values

#### OP_PRIMARY_PARTITIONS

    public static final int OP_PRIMARY_PARTITIONS

See Also:
  Constant Field Values

#### OP_PARTITIONS

    public static final int OP_PARTITIONS

See Also:
  Constant Field Values

### Constructor Detail

#### PlatformAffinity

    public PlatformAffinity(PlatformContext platformCtx,
                            @Nullable
                            @Nullable String name)
                     throws IgniteCheckedException

Constructor.

Parameters:
  `platformCtx` - Context.
  `name` - Cache name.
Throws:
  `IgniteCheckedException`

### Method Detail

#### processInStreamOutLong

    public long processInStreamOutLong(int type,
                                       BinaryRawReaderEx reader)
                                throws IgniteCheckedException

Process IN operation.

Specified by:
  `processInStreamOutLong` in interface `PlatformTarget`
Overrides:
  `processInStreamOutLong` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `reader` - Binary reader.
Returns:
  Result.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processInStreamOutStream

    public void processInStreamOutStream(int type,
                                         BinaryRawReaderEx reader,
                                         BinaryRawWriterEx writer)
                                  throws IgniteCheckedException

Process IN-OUT operation.

Specified by:
  `processInStreamOutStream` in interface `PlatformTarget`
Overrides:
  `processInStreamOutStream` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `reader` - Binary reader.
  `writer` - Binary writer.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processInLongOutLong

    public long processInLongOutLong(int type,
                                     long val)
                              throws IgniteCheckedException

Process IN operation.

Specified by:
  `processInLongOutLong` in interface `PlatformTarget`
Overrides:
  `processInLongOutLong` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `val` - Value.
Returns:
  Result.
Throws:
  `IgniteCheckedException` - In case of exception.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023