org.apache.ignite.spi.discovery.tcp.messages

## Class TcpDiscoveryAbstractMessage

- java.lang.Object
- - org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  TcpDiscoveryAuthFailedMessage, TcpDiscoveryCheckFailedMessage, TcpDiscoveryClientAckResponse, TcpDiscoveryClientMetricsUpdateMessage, TcpDiscoveryClientPingRequest, TcpDiscoveryClientPingResponse, TcpDiscoveryClientReconnectMessage, TcpDiscoveryConnectionCheckMessage, TcpDiscoveryCustomEventMessage, TcpDiscoveryDiscardMessage, TcpDiscoveryDuplicateIdMessage, TcpDiscoveryHandshakeRequest, TcpDiscoveryHandshakeResponse, TcpDiscoveryJoinRequestMessage, TcpDiscoveryLoopbackProblemMessage, TcpDiscoveryMetricsUpdateMessage, TcpDiscoveryNodeAddedMessage, TcpDiscoveryNodeAddFinishedMessage, TcpDiscoveryNodeFailedMessage, TcpDiscoveryNodeLeftMessage, TcpDiscoveryPingRequest, TcpDiscoveryPingResponse, TcpDiscoveryStatusCheckMessage

    public abstract class TcpDiscoveryAbstractMessage
    extends Object
    implements Serializable

Base class to implement discovery messages.

See Also:
  Serialized Form

### Field Summary

Fields
`protected static int` `CLIENT_ACK_FLAG_POS`
`protected static int` `CLIENT_FLAG_POS`
`protected static int` `CLIENT_RECON_SUCCESS_FLAG_POS`
`protected static int` `FORCE_FAIL_FLAG_POS`
`protected static int` `RESPONDED_FLAG_POS`

### Constructor Summary

Constructors
`protected` `TcpDiscoveryAbstractMessage()` Default no-arg constructor for `Externalizable` interface.
`protected` `TcpDiscoveryAbstractMessage(TcpDiscoveryAbstractMessage msg)`
`protected` `TcpDiscoveryAbstractMessage(UUID creatorNodeId)` Constructor.

### Method Summary

Methods
`void` `addFailedNode(UUID nodeId)` Adds node ID to the failed nodes list.
`boolean` `client()` Get client node flag.
`void` `client(boolean client)` Sets client node flag.
`UUID` `creatorNodeId()` Gets creator node.
`boolean` `equals(Object obj)`
`Collection<UUID>` `failedNodes()`
`void` `failedNodes(Set<UUID> failedNodes)`
`boolean` `force()` Get force fail node flag.
`void` `force(boolean force)` Sets force fail node flag.
`protected boolean` `getFlag(int pos)`
`int` `hashCode()`
`boolean` `highPriority()`
`IgniteUuid` `id()` Gets message ID.
`short` `pendingIndex()`
`void` `pendingIndex(short pendingIdx)`
`UUID` `senderNodeId()` Gets sender node ID.
`void` `senderNodeId(UUID sndNodeId)` Sets sender node ID.
`protected void` `setFlag(int pos, boolean val)`
`long` `topologyVersion()` Gets topology version.
`void` `topologyVersion(long topVer)` Sets topology version.
`String` `toString()`
`boolean` `traceLogLevel()`
`boolean` `verified()` Checks whether message is verified.
`UUID` `verifierNodeId()` Gets verifier node ID.
`void` `verify(UUID verifierNodeId)` Verifies the message and stores verifier ID.

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

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

### Field Detail

#### CLIENT_FLAG_POS

    protected static final int CLIENT_FLAG_POS

See Also:
  Constant Field Values

#### RESPONDED_FLAG_POS

    protected static final int RESPONDED_FLAG_POS

See Also:
  Constant Field Values

#### CLIENT_RECON_SUCCESS_FLAG_POS

    protected static final int CLIENT_RECON_SUCCESS_FLAG_POS

See Also:
  Constant Field Values

#### CLIENT_ACK_FLAG_POS

    protected static final int CLIENT_ACK_FLAG_POS

See Also:
  Constant Field Values

#### FORCE_FAIL_FLAG_POS

    protected static final int FORCE_FAIL_FLAG_POS

See Also:
  Constant Field Values

### Constructor Detail

#### TcpDiscoveryAbstractMessage

    protected TcpDiscoveryAbstractMessage()

Default no-arg constructor for `Externalizable` interface.

#### TcpDiscoveryAbstractMessage

    protected TcpDiscoveryAbstractMessage(UUID creatorNodeId)

Constructor.

Parameters:
  `creatorNodeId` - Creator node ID.

#### TcpDiscoveryAbstractMessage

    protected TcpDiscoveryAbstractMessage(TcpDiscoveryAbstractMessage msg)

Parameters:
  `msg` - Message.

### Method Detail

#### traceLogLevel

    public boolean traceLogLevel()

Returns:
  `True` if need use trace logging for this message (to reduce amount of logging with debug level).

#### creatorNodeId

    public UUID creatorNodeId()

Gets creator node.

Returns:
  Creator node ID.

#### id

    public IgniteUuid id()

Gets message ID.

Returns:
  Message ID.

#### senderNodeId

    public UUID senderNodeId()

Gets sender node ID.

Returns:
  Sender node ID.

#### senderNodeId

    public void senderNodeId(UUID sndNodeId)

Sets sender node ID.

Parameters:
  `sndNodeId` - Sender node ID.

#### verified

    public boolean verified()

Checks whether message is verified.

Returns:
  `true` if message was verified.

#### verifierNodeId

    public UUID verifierNodeId()

Gets verifier node ID.

Returns:
  verifier node ID.

#### verify

    public void verify(UUID verifierNodeId)

Verifies the message and stores verifier ID.

Parameters:
  `verifierNodeId` - Verifier node ID.

#### topologyVersion

    public long topologyVersion()

Gets topology version.

Returns:
  Topology version.

#### topologyVersion

    public void topologyVersion(long topVer)

Sets topology version.

Parameters:
  `topVer` - Topology version.

#### client

    public boolean client()

Get client node flag.

Returns:
  Client node flag.

#### client

    public void client(boolean client)

Sets client node flag.

Parameters:
  `client` - Client node flag.

#### force

    public boolean force()

Get force fail node flag.

Returns:
  Force fail node flag.

#### force

    public void force(boolean force)

Sets force fail node flag.

Parameters:
  `force` - Force fail node flag.

#### pendingIndex

    public short pendingIndex()

Returns:
  Pending message index.

#### pendingIndex

    public void pendingIndex(short pendingIdx)

Parameters:
  `pendingIdx` - Pending message index.

#### getFlag

    protected boolean getFlag(int pos)

Parameters:
  `pos` - Flag position.
Returns:
  Flag value.

#### setFlag

    protected void setFlag(int pos,
               boolean val)

Parameters:
  `pos` - Flag position.
  `val` - Flag value.

#### highPriority

    public boolean highPriority()

Returns:
  `true` if message must be added to head of queue.

#### addFailedNode

    public void addFailedNode(UUID nodeId)

Adds node ID to the failed nodes list.

Parameters:
  `nodeId` - Node ID.

#### failedNodes

    public void failedNodes(@Nullable
                   Set<UUID> failedNodes)

Parameters:
  `failedNodes` - Failed nodes.

#### failedNodes

    @Nullable
    public Collection<UUID> failedNodes()

Returns:
  Failed nodes IDs.

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public final int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017