org.apache.ignite.spi.communication.tcp.internal

## Class ConnectionKey

- java.lang.Object
- - org.apache.ignite.spi.communication.tcp.internal.ConnectionKey

    public class ConnectionKey
    extends Object

Connection Key.

### Constructor Summary

Constructors
Constructor and Description
`ConnectionKey(@NotNull UUID nodeId, int idx)`
`ConnectionKey(@NotNull UUID nodeId, int idx, long connCnt)` Creates ConnectionKey with false value of dummy flag.
`ConnectionKey(@NotNull UUID nodeId, int idx, long connCnt, boolean dummy)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `connectCount()`
`int` `connectionIndex()`
`boolean` `dummy()`
`boolean` `equals(Object o)`
`int` `hashCode()`
`UUID` `nodeId()`
`String` `toString()`

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

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

### Constructor Detail

#### ConnectionKey

    public ConnectionKey(@NotNull
                         @NotNull UUID nodeId,
                         int idx)

Parameters:
  `nodeId` - Node ID. Should be not null.
  `idx` - Connection index.

#### ConnectionKey

    public ConnectionKey(@NotNull
                         @NotNull UUID nodeId,
                         int idx,
                         long connCnt)

Creates ConnectionKey with false value of dummy flag.

Parameters:
  `nodeId` - Node ID. Should be not null.
  `idx` - Connection index.
  `connCnt` - Connection counter (set only for incoming connections).

#### ConnectionKey

    public ConnectionKey(@NotNull
                         @NotNull UUID nodeId,
                         int idx,
                         long connCnt,
                         boolean dummy)

Parameters:
  `nodeId` - Node ID. Should be not null.
  `idx` - Connection index.
  `connCnt` - Connection counter (set only for incoming connections).
  `dummy` - Indicates that session with this ConnectionKey is temporary (for now dummy sessions are used only for Communication Failure Resolving process).

### Method Detail

#### connectCount

    public long connectCount()

Returns:
  Connection counter.

#### nodeId

    public UUID nodeId()

Returns:
  Node ID.

#### connectionIndex

    public int connectionIndex()

Returns:
  Connection index.

#### dummy

    public boolean dummy()

Returns:
  `True` if this ConnectionKey is dummy and serves temporary session.

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021