org.apache.ignite.internal.client.impl

## Class GridClientNodeImpl

- java.lang.Object
- - org.apache.ignite.internal.client.impl.GridClientNodeImpl

All Implemented Interfaces:
  GridClientNode

    public class GridClientNodeImpl
    extends Object
    implements GridClientNode

Client node implementation.

### Nested Class Summary

Nested Classes
`static class` `GridClientNodeImpl.Builder` Builder for instances of this class.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`<T> T` `attribute(String name)` Gets specific attribute of remote node.
`Map<String,Object>` `attributes()` Gets all attributes of remote node.
`Collection<InetSocketAddress>` `availableAddresses(GridClientProtocol proto, boolean filterResolved)` Gets collection of addresses on which REST binary protocol is bound.
`static GridClientNodeImpl.Builder` `builder()` Creates and returns a builder for a new instance of this class.
`static GridClientNodeImpl.Builder` `builder(GridClientNode from, boolean skipAttrs, boolean skipMetrics)` Creates and returns a builder for a new instance of this class, copying data from an input instance.
`Map<String,GridClientCacheMode>` `caches()` Gets all configured caches and their types on remote node.
`boolean` `connectable()` Indicates whether client can establish direct connection with this node.
`Object` `consistentId()` Gets consistent globally unique node ID.
`boolean` `equals(Object o)`
`int` `hashCode()`
`GridClientNodeMetrics` `metrics()` Gets various dynamic metrics of remote node.
`UUID` `nodeId()` Gets ID of a remote node.
`long` `order()` Node order within grid topology.
`List<String>` `tcpAddresses()` Gets list of REST TCP server addresses of remote node.
`List<String>` `tcpHostNames()` Gets list of REST TCP server host names of remote node.
`int` `tcpPort()` Gets client TCP port of remote node.
`String` `toString()`

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

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

### Method Detail

#### builder

    public static GridClientNodeImpl.Builder builder()

Creates and returns a builder for a new instance of this class.

Returns:
  Builder for new instance.

#### builder

    public static GridClientNodeImpl.Builder builder(GridClientNode from,
                                                     boolean skipAttrs,
                                                     boolean skipMetrics)

Creates and returns a builder for a new instance of this class, copying data from an input instance.

Parameters:
  `from` - Instance to copy data from.
  `skipAttrs` - Whether to skip attributes.
  `skipMetrics` - Whether to skip metrics.
Returns:
  Builder for new instance.

#### nodeId

    public UUID nodeId()

Gets ID of a remote node.

Specified by:
  `nodeId` in interface `GridClientNode`
Returns:
  Node ID.

#### consistentId

    public Object consistentId()

Gets consistent globally unique node ID. Unlike `GridClientNode.nodeId()` method, this method returns consistent node ID which survives node restarts.

Specified by:
  `consistentId` in interface `GridClientNode`
Returns:
  Consistent globally unique node ID.

#### tcpAddresses

    public List<String> tcpAddresses()

Gets list of REST TCP server addresses of remote node.

Specified by:
  `tcpAddresses` in interface `GridClientNode`
Returns:
  REST TCP server addresses.

#### tcpHostNames

    public List<String> tcpHostNames()

Gets list of REST TCP server host names of remote node.

Specified by:
  `tcpHostNames` in interface `GridClientNode`
Returns:
  REST TCP server host names.

#### tcpPort

    public int tcpPort()

Gets client TCP port of remote node.

Specified by:
  `tcpPort` in interface `GridClientNode`
Returns:
  Remote tcp port.

#### attributes

    public Map<String,Object> attributes()

Gets all attributes of remote node. Note that all system and environment properties are automatically includes in node attributes. User can also attach custom attributes and then use them to further filter remote nodes into virtual subgrids for task execution.

Specified by:
  `attributes` in interface `GridClientNode`
Returns:
  All node attributes.

#### attribute

    @Nullable
    public <T> T attribute(String name)

Gets specific attribute of remote node.

Specified by:
  `attribute` in interface `GridClientNode`
Parameters:
  `name` - Attribute name.
Returns:
  Attribute value.
See Also:
  `GridClientNode.attributes()`

#### metrics

    public GridClientNodeMetrics metrics()

Gets various dynamic metrics of remote node.

Specified by:
  `metrics` in interface `GridClientNode`
Returns:
  Metrics of remote node.

#### caches

    public Map<String,GridClientCacheMode> caches()

Gets all configured caches and their types on remote node.

Specified by:
  `caches` in interface `GridClientNode`
Returns:
  Map in which key is a configured cache name on the node, value is mode of configured cache.

#### availableAddresses

    public Collection<InetSocketAddress> availableAddresses(GridClientProtocol proto,
                                                            boolean filterResolved)

Gets collection of addresses on which REST binary protocol is bound.

Specified by:
  `availableAddresses` in interface `GridClientNode`
Parameters:
  `proto` - Protocol for which addresses are obtained.
  `filterResolved` - Whether to filter resolved addresses ( `InetSocketAddress.isUnresolved()` returns `False` ) or not.
Returns:
  List of addresses.

#### order

    public long order()

Node order within grid topology.

Specified by:
  `order` in interface `GridClientNode`
Returns:
  Node startup order.

#### connectable

    public boolean connectable()

Indicates whether client can establish direct connection with this node. So it is guaranteed that that any request will take only one network 'hop' before it will be processed by a Grid node.

Specified by:
  `connectable` in interface `GridClientNode`
Returns:
  `true` if node can be directly connected, `false` if request may be passed through a router.

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018