org.apache.ignite.internal.processors.clock

## Class GridClockServer

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

    public class GridClockServer
    extends Object

Time server that enables time synchronization between nodes.

### Constructor Summary

Constructors
Constructor and Description
`GridClockServer()`

### Method Summary

Methods
`void` `afterStart()` After start callback.
`void` `beforeStop()` Before stop callback.
`InetAddress` `host()`
`int` `port()`
`void` `sendPacket(GridClockMessage msg, InetAddress addr, int port)` Sends packet to remote node.
`void` `start(GridKernalContext ctx)` Starts server.
`void` `stop()` Stops server.

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

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

### Constructor Detail

#### GridClockServer

    public GridClockServer()

### Method Detail

#### start

    public void start(GridKernalContext ctx)
               throws IgniteCheckedException

Starts server.

Parameters:
  `ctx` - Kernal context.
Throws:
  `IgniteCheckedException` - If server could not be started.

#### afterStart

    public void afterStart()

After start callback.

#### stop

    public void stop()

Stops server.

#### beforeStop

    public void beforeStop()

Before stop callback.

#### sendPacket

    public void sendPacket(GridClockMessage msg,
                  InetAddress addr,
                  int port)
                    throws IgniteCheckedException

Sends packet to remote node.

Parameters:
  `msg` - Message to send.
  `addr` - Address.
  `port` - Port.
Throws:
  `IgniteCheckedException` - If send failed.

#### host

    public InetAddress host()

Returns:
  Address to which this server is bound.

#### port

    public int port()

Returns:
  Port to which this server is bound.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.6.0
Release Date | : May 18 2016