org.apache.ignite.internal.processors.clock

## Class GridClockDeltaSnapshot

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

    public class GridClockDeltaSnapshot
    extends Object

Snapshot of time deltas for given topology.

### Constructor Summary

Constructors
Constructor and Description
`GridClockDeltaSnapshot(GridClockDeltaVersion ver, Map<UUID,Long> deltas)`
`GridClockDeltaSnapshot(GridClockDeltaVersion ver, UUID locNodeId, GridDiscoveryTopologySnapshot discoSnap, int avgSize)`

### Method Summary

Methods
`void` `awaitReady(long timeout)` Awaits either until snapshot is ready or timeout elapses.
`Map<UUID,Long>` `deltas()`
`boolean` `onDeltaReceived(UUID nodeId, long timeDelta)` Callback invoked when time delta is received from remote node.
`void` `onNodeLeft(UUID nodeId)` Callback invoked when node left.
`Collection<UUID>` `pendingNodeIds()`
`boolean` `ready()`
`String` `toString()`
`GridClockDeltaVersion` `version()`

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

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

### Constructor Detail

#### GridClockDeltaSnapshot

    public GridClockDeltaSnapshot(GridClockDeltaVersion ver,
                          UUID locNodeId,
                          GridDiscoveryTopologySnapshot discoSnap,
                          int avgSize)

Parameters:
  `ver` - Snapshot version.
  `locNodeId` - Local node ID.
  `discoSnap` - Discovery snapshot.
  `avgSize` - Average size.

#### GridClockDeltaSnapshot

    public GridClockDeltaSnapshot(GridClockDeltaVersion ver,
                          Map<UUID,Long> deltas)

Parameters:
  `ver` - Snapshot version.
  `deltas` - Deltas map.

### Method Detail

#### version

    public GridClockDeltaVersion version()

Returns:
  Version.

#### deltas

    public Map<UUID,Long> deltas()

Returns:
  Map of collected deltas.

#### awaitReady

    public void awaitReady(long timeout)
                    throws IgniteInterruptedCheckedException

Awaits either until snapshot is ready or timeout elapses.

Parameters:
  `timeout` - Timeout to wait.
Throws:
  `IgniteInterruptedCheckedException` - If wait was interrupted.

#### onDeltaReceived

    public boolean onDeltaReceived(UUID nodeId,
                          long timeDelta)

Callback invoked when time delta is received from remote node.

Parameters:
  `nodeId` - Node ID.
  `timeDelta` - Calculated time delta.
Returns:
  `True` if more samples needed from that node.

#### onNodeLeft

    public void onNodeLeft(UUID nodeId)

Callback invoked when node left.

Parameters:
  `nodeId` - Left node ID.

#### ready

    public boolean ready()

Returns:
  `True` if snapshot is ready.

#### pendingNodeIds

    public Collection<UUID> pendingNodeIds()

Returns:
  Collection of node IDs for which response was not received so far.

#### 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