org.apache.ignite.internal.managers.discovery

## Class DiscoCache

- java.lang.Object
- - org.apache.ignite.internal.managers.discovery.DiscoCache

    public class DiscoCache
    extends Object

### Method Summary

Methods
`Collection<ClusterNode>` `aliveServerNodes()` Gets collection of server nodes with at least one cache configured.
`Collection<ClusterNode>` `aliveServerNodesWithCaches()` Gets collection of server nodes with at least one cache configured.
`List<ClusterNode>` `allNodes()`
`List<ClusterNode>` `allNodesWithCaches()` Gets collection of nodes with at least one cache configured.
`List<ClusterNode>` `cacheGroupAffinityNodes(int grpId)`
`List<ClusterNode>` `cacheNodes(Integer cacheId)` Gets all nodes that have cache with given ID.
`List<ClusterNode>` `cacheNodes(String cacheName)` Gets all nodes that have cache with given name.
`List<ClusterNode>` `daemonNodes()`
`ClusterNode` `localNode()`
`ClusterNode` `node(UUID id)`
`ClusterNode` `oldestAliveServerNode()`
`ClusterNode` `oldestAliveServerNodeWithCache()`
`List<ClusterNode>` `remoteNodes()`
`List<ClusterNode>` `remoteNodesWithCaches()` Gets all remote nodes that have at least one cache configured.
`List<ClusterNode>` `serverNodes()`
`List<ClusterNode>` `serverNodesWithCaches()`
`DiscoveryDataClusterState` `state()`
`String` `toString()`
`void` `updateAlives(ClusterNode rmvd)` Removes left node from alives lists.
`void` `updateAlives(GridDiscoveryManager discovery)` Removes left nodes from cached alives lists.

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

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

### Method Detail

#### state

    public DiscoveryDataClusterState state()

Returns:
  Current cluster state.

#### localNode

    public ClusterNode localNode()

Returns:
  Local node.

#### remoteNodes

    public List<ClusterNode> remoteNodes()

Returns:
  Remote nodes.

#### allNodes

    public List<ClusterNode> allNodes()

Returns:
  All nodes.

#### serverNodes

    public List<ClusterNode> serverNodes()

Returns:
  Server nodes.

#### daemonNodes

    public List<ClusterNode> daemonNodes()

Returns:
  Daemon nodes.

#### serverNodesWithCaches

    public List<ClusterNode> serverNodesWithCaches()

Returns:
  Server nodes with at least one cache configured.

#### remoteNodesWithCaches

    public List<ClusterNode> remoteNodesWithCaches()

Gets all remote nodes that have at least one cache configured.

Returns:
  Collection of nodes.

#### allNodesWithCaches

    public List<ClusterNode> allNodesWithCaches()

Gets collection of nodes with at least one cache configured.

Returns:
  Collection of nodes.

#### aliveServerNodes

    public Collection<ClusterNode> aliveServerNodes()

Gets collection of server nodes with at least one cache configured.

Returns:
  Collection of nodes.

#### aliveServerNodesWithCaches

    public Collection<ClusterNode> aliveServerNodesWithCaches()

Gets collection of server nodes with at least one cache configured.

Returns:
  Collection of nodes.

#### oldestAliveServerNode

    @Nullable
    public ClusterNode oldestAliveServerNode()

Returns:
  Oldest alive server node.

#### oldestAliveServerNodeWithCache

    @Nullable
    public ClusterNode oldestAliveServerNodeWithCache()

Returns:
  Oldest alive server node with at least one cache configured.

#### cacheNodes

    public List<ClusterNode> cacheNodes(@Nullable
                               String cacheName)

Gets all nodes that have cache with given name.

Parameters:
  `cacheName` - Cache name.
Returns:
  Collection of nodes.

#### cacheNodes

    public List<ClusterNode> cacheNodes(Integer cacheId)

Gets all nodes that have cache with given ID.

Parameters:
  `cacheId` - Cache ID.
Returns:
  Collection of nodes.

#### cacheGroupAffinityNodes

    public List<ClusterNode> cacheGroupAffinityNodes(int grpId)

Parameters:
  `grpId` - Cache group ID.
Returns:
  All nodes that participate in affinity calculation.

#### node

    @Nullable
    public ClusterNode node(UUID id)

Parameters:
  `id` - Node ID.
Returns:
  Node.

#### updateAlives

    public void updateAlives(ClusterNode rmvd)

Removes left node from alives lists.

Parameters:
  `rmvd` - Removed node.

#### updateAlives

    public void updateAlives(GridDiscoveryManager discovery)

Removes left nodes from cached alives lists.

Parameters:
  `discovery` - Discovery manager.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017