org.apache.ignite.internal.client

## Class GridClientDataConfiguration

- java.lang.Object
- - org.apache.ignite.internal.client.GridClientDataConfiguration

    public class GridClientDataConfiguration
    extends Object

Java client data configuration.

### Constructor Summary

Constructors
Constructor and Description
`GridClientDataConfiguration()` Creates empty configuration.
`GridClientDataConfiguration(GridClientDataConfiguration cfg)` Copy constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`GridClientDataAffinity` `getAffinity()` Gets affinity to be used to communicate with remote cache.
`String` `getName()` Gets name of remote cache.
`GridClientLoadBalancer` `getPinnedBalancer()` Gets balancer to use for pinned nodes.
`GridClientDataConfiguration` `setAffinity(GridClientDataAffinity affinity)` Sets client data affinity for this configuration.
`GridClientDataConfiguration` `setBalancer(GridClientLoadBalancer balancer)` Sets balancer for pinned mode for this configuration.
`GridClientDataConfiguration` `setName(String name)` Sets grid cache name for this configuration.

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

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

### Constructor Detail

#### GridClientDataConfiguration

    public GridClientDataConfiguration()

Creates empty configuration.

#### GridClientDataConfiguration

    public GridClientDataConfiguration(GridClientDataConfiguration cfg)

Copy constructor.

Parameters:
  `cfg` - Configuration to copy.

### Method Detail

#### getName

    public String getName()

Gets name of remote cache.

Returns:
  Remote cache name.

#### setName

    public GridClientDataConfiguration setName(String name)

Sets grid cache name for this configuration.

Parameters:
  `name` - Cache name.
Returns:
  `this` for chaining.

#### getAffinity

    public GridClientDataAffinity getAffinity()

Gets affinity to be used to communicate with remote cache. Affinity allows to contact exactly the node where the data is and therefore avoiding extra network hops.

Use `GridClientPartitionAffinity` as default affinity communication to work with remote partitioned caches.

Returns:
  Cache affinity to use.

#### setAffinity

    public GridClientDataConfiguration setAffinity(GridClientDataAffinity affinity)

Sets client data affinity for this configuration. Affinity allows to contact exactly the node where the data is and therefore avoiding extra network hops.

Use `GridClientPartitionAffinity` as default affinity communication to work with remote partitioned caches.

Parameters:
  `affinity` - Client data affinity.
Returns:
  `this` for chaining.

#### getPinnedBalancer

    public GridClientLoadBalancer getPinnedBalancer()

Gets balancer to use for pinned nodes. See `GridClientLoadBalancer` for more information.

Returns:
  Node balancer for pinned mode.

#### setBalancer

    public GridClientDataConfiguration setBalancer(GridClientLoadBalancer balancer)

Sets balancer for pinned mode for this configuration.

Parameters:
  `balancer` - Balancer that will be used in pinned mode.
Returns:
  `this` for chaining.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019