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

## Class PlatformAffinityUtils

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

    public class PlatformAffinityUtils
    extends Object

Affinity serialization functions.

### Constructor Summary

Constructors
Constructor and Description
`PlatformAffinityUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static List<List<ClusterNode>>` `readPartitionAssignment(BinaryRawReader reader, PlatformContext ctx)` Reads the partition assignment.
`static void` `writeAffinityFunctionContext(AffinityFunctionContext affCtx, BinaryRawWriterEx writer, PlatformContext ctx)` Writes the affinity function context.
`static void` `writePartitionAssignment(Collection<List<ClusterNode>> partitions, BinaryRawWriterEx writer, PlatformContext ctx)` Writes the partition assignment to a stream.

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

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

### Constructor Detail

#### PlatformAffinityUtils

    public PlatformAffinityUtils()

### Method Detail

#### writeAffinityFunctionContext

    public static void writeAffinityFunctionContext(AffinityFunctionContext affCtx,
                                                    BinaryRawWriterEx writer,
                                                    PlatformContext ctx)

Writes the affinity function context.

Parameters:
  `affCtx` - Affinity context.
  `writer` - Writer.
  `ctx` - Platform context.

#### writePartitionAssignment

    public static void writePartitionAssignment(Collection<List<ClusterNode>> partitions,
                                                BinaryRawWriterEx writer,
                                                PlatformContext ctx)

Writes the partition assignment to a stream.

Parameters:
  `partitions` - Partitions.
  `writer` - Writer.

#### readPartitionAssignment

    @NotNull
    public static List<List<ClusterNode>> readPartitionAssignment(BinaryRawReader reader,
                                                                           PlatformContext ctx)

Reads the partition assignment.

Parameters:
  `reader` - Reader.
  `ctx` - Platform context.
Returns:
  Partitions.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018