org.apache.ignite.internal.processors.cache

## Class ExchangeContext

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.ExchangeContext

    public class ExchangeContext
    extends Object

### Field Summary

Fields
`static String` `IGNITE_EXCHANGE_COMPATIBILITY_VER_1`

### Constructor Summary

Constructors
Constructor and Description
`ExchangeContext(GridCacheSharedContext<?,?> cctx, boolean crd, GridDhtPartitionsExchangeFuture fut)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ExchangeDiscoveryEvents` `events()`
`boolean` `exchangeFreeSwitch()`
`boolean` `fetchAffinityOnJoin()`
`@Nullable Set<Integer>` `groupsAffinityRequestOnJoin()`
`boolean` `mergeExchanges()`
`String` `toString()`

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

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

### Field Detail

#### IGNITE_EXCHANGE_COMPATIBILITY_VER_1

    public static final String IGNITE_EXCHANGE_COMPATIBILITY_VER_1

See Also:
  Constant Field Values

### Constructor Detail

#### ExchangeContext

    public ExchangeContext(GridCacheSharedContext<?,?> cctx,
                           boolean crd,
                           GridDhtPartitionsExchangeFuture fut)

Parameters:
  `cctx` - Context.
  `crd` - Coordinator flag.
  `fut` - Exchange future.

### Method Detail

#### events

    public ExchangeDiscoveryEvents events()

Returns:
  Discovery events.

#### fetchAffinityOnJoin

    public boolean fetchAffinityOnJoin()

Returns:
  `True` if on local join need fetch affinity per-group (old protocol), otherwise affinity is sent in `GridDhtPartitionsFullMessage`.

#### exchangeFreeSwitch

    public boolean exchangeFreeSwitch()

Returns:
  `True` if it's safe to perform PME-free switch.

#### groupsAffinityRequestOnJoin

    @Nullable
    public @Nullable Set<Integer> groupsAffinityRequestOnJoin()

Returns:
  Groups to request affinity for.

#### mergeExchanges

    public boolean mergeExchanges()

Returns:
  `True` if exchanges merge is allowed during current exchange.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020