org.apache.ignite.internal.client.thin

## Class TcpIgniteClient

- java.lang.Object
- - org.apache.ignite.internal.client.thin.TcpIgniteClient

All Implemented Interfaces:
  AutoCloseable, IgniteClient

    public class TcpIgniteClient
    extends Object
    implements IgniteClient

Implementation of `IgniteClient` over TCP protocol.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`IgniteBinary` `binary()`
`<K,V> ClientCache<K,V>` `cache(String name)` Get existing cache.
`Collection<String>` `cacheNames()`
`void` `close()`
`<K,V> ClientCache<K,V>` `createCache(ClientCacheConfiguration cfg)` Create cache.
`<K,V> ClientCache<K,V>` `createCache(String name)` Create cache.
`void` `destroyCache(String name)` Destroy cache.
`<K,V> ClientCache<K,V>` `getOrCreateCache(ClientCacheConfiguration cfg)` Get existing cache or create the cache if it does not exist.
`<K,V> ClientCache<K,V>` `getOrCreateCache(String name)` Get existing cache or create the cache if it does not exist.
`FieldsQueryCursor<List<?>>` `query(SqlFieldsQuery qry)` Execute SQL query and get cursor to iterate over results.
`static IgniteClient` `start(ClientConfiguration cfg)` Initializes new instance of `IgniteClient`.

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

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

### Method Detail

#### close

    public void close()
               throws Exception

Specified by:
  `close` in interface `AutoCloseable`
Throws:
  `Exception`

#### getOrCreateCache

    public <K,V> ClientCache<K,V> getOrCreateCache(String name)
                                            throws ClientException

Get existing cache or create the cache if it does not exist.

Specified by:
  `getOrCreateCache` in interface `IgniteClient`
Parameters:
  `name` - Cache name.
Throws:
  `ClientException`

#### getOrCreateCache

    public <K,V> ClientCache<K,V> getOrCreateCache(ClientCacheConfiguration cfg)
                                            throws ClientException

Get existing cache or create the cache if it does not exist.

Specified by:
  `getOrCreateCache` in interface `IgniteClient`
Parameters:
  `cfg` - Cache configuration.
Throws:
  `ClientException`

#### cache

    public <K,V> ClientCache<K,V> cache(String name)

Get existing cache.

Specified by:
  `cache` in interface `IgniteClient`
Parameters:
  `name` - Cache name.

#### cacheNames

    public Collection<String> cacheNames()
                                  throws ClientException

Specified by:
  `cacheNames` in interface `IgniteClient`
Returns:
  Collection of names of currently available caches or an empty collection if no caches are available.
Throws:
  `ClientException`

#### destroyCache

    public void destroyCache(String name)
                      throws ClientException

Destroy cache.

Specified by:
  `destroyCache` in interface `IgniteClient`
Throws:
  `ClientException`

#### createCache

    public <K,V> ClientCache<K,V> createCache(String name)
                                       throws ClientException

Create cache.

Specified by:
  `createCache` in interface `IgniteClient`
Parameters:
  `name` - Cache name.
Throws:
  `ClientException`

#### createCache

    public <K,V> ClientCache<K,V> createCache(ClientCacheConfiguration cfg)
                                       throws ClientException

Create cache.

Specified by:
  `createCache` in interface `IgniteClient`
Parameters:
  `cfg` - Cache configuration.
Throws:
  `ClientException`

#### binary

    public IgniteBinary binary()

Specified by:
  `binary` in interface `IgniteClient`
Returns:
  Instance of `IgniteBinary` interface.

#### query

    public FieldsQueryCursor<List<?>> query(SqlFieldsQuery qry)

Execute SQL query and get cursor to iterate over results.

Specified by:
  `query` in interface `IgniteClient`
Parameters:
  `qry` - SQL query.
Returns:
  Cursor.

#### start

    public static IgniteClient start(ClientConfiguration cfg)
                              throws ClientException

Initializes new instance of `IgniteClient`.

Server connection will be lazily initialized when first required.

Parameters:
  `cfg` - Thin client configuration.
Returns:
  Successfully opened thin client connection.
Throws:
  `ClientException`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018