org.apache.ignite.internal.processors.clock

## Class GridClockMessage

- java.lang.Object
- - org.apache.ignite.internal.processors.clock.GridClockMessage

    public class GridClockMessage
    extends Object

Time server message.

### Field Summary

Fields
`static int` `PACKET_SIZE` Packet size.

### Constructor Summary

Constructors
Constructor and Description
`GridClockMessage(UUID origNodeId, UUID targetNodeId, long origTs, long replyTs)`

### Method Summary

Methods
`static GridClockMessage` `fromBytes(byte[] buf, int off, int len)` Constructs message from bytes.
`UUID` `originatingNodeId()`
`void` `originatingNodeId(UUID origNodeId)`
`long` `originatingTimestamp()`
`void` `originatingTimestamp(long origTs)`
`long` `replyTimestamp()`
`void` `replyTimestamp(long replyTs)`
`UUID` `targetNodeId()`
`void` `targetNodeId(UUID targetNodeId)`
`byte[]` `toBytes()` Converts message to bytes to send over network.
`String` `toString()`

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

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

### Field Detail

#### PACKET_SIZE

    public static final int PACKET_SIZE

Packet size.

See Also:
  Constant Field Values

### Constructor Detail

#### GridClockMessage

    public GridClockMessage(UUID origNodeId,
                    UUID targetNodeId,
                    long origTs,
                    long replyTs)

Parameters:
  `origNodeId` - Originating node ID.
  `targetNodeId` - Target node ID.
  `origTs` - Originating timestamp.
  `replyTs` - Reply timestamp.

### Method Detail

#### originatingNodeId

    public UUID originatingNodeId()

Returns:
  Originating node ID.

#### originatingNodeId

    public void originatingNodeId(UUID origNodeId)

Parameters:
  `origNodeId` - Originating node ID.

#### targetNodeId

    public UUID targetNodeId()

Returns:
  Target node ID.

#### targetNodeId

    public void targetNodeId(UUID targetNodeId)

Parameters:
  `targetNodeId` - Target node ID.

#### originatingTimestamp

    public long originatingTimestamp()

Returns:
  Originating timestamp.

#### originatingTimestamp

    public void originatingTimestamp(long origTs)

Parameters:
  `origTs` - Originating timestamp.

#### replyTimestamp

    public long replyTimestamp()

Returns:
  Reply timestamp.

#### replyTimestamp

    public void replyTimestamp(long replyTs)

Parameters:
  `replyTs` - Reply timestamp.

#### toBytes

    public byte[] toBytes()

Converts message to bytes to send over network.

Returns:
  Bytes representing this packet.

#### fromBytes

    public static GridClockMessage fromBytes(byte[] buf,
                             int off,
                             int len)
                                      throws IgniteCheckedException

Constructs message from bytes.

Parameters:
  `buf` - Bytes.
  `off` - Offset.
  `len` - Packet length.
Returns:
  Assembled message.
Throws:
  `IgniteCheckedException` - If message length is invalid.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.7.0
Release Date | : August 1 2016