org.apache.ignite.internal.processors.query

## Class SqlClientContext

- java.lang.Object
- - org.apache.ignite.internal.processors.query.SqlClientContext

All Implemented Interfaces:
  AutoCloseable

    public class SqlClientContext
    extends Object
    implements AutoCloseable

Container for connection properties passed by various drivers (JDBC, ODBC drivers) having notion of an SQL connection - Ignite basically does not have one.

Also contains anything that a driver may need to share between threads processing queries of logically same client - see JDBC thin driver

### Constructor Summary

Constructors
Constructor and Description
`SqlClientContext(GridKernalContext ctx, javax.cache.configuration.Factory<GridWorker> orderedBatchWorkerFactory, boolean distributedJoins, boolean enforceJoinOrder, boolean collocated, boolean replicatedOnly, boolean lazy, boolean skipReducerOnUpdate)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`void` `disableStreaming()` Turn off streaming on this client context - with closing all open streamers, if any.
`void` `enableStreaming(boolean allowOverwrite, long flushFreq, int perNodeBufSize, int perNodeParOps, boolean ordered)` Turn on streaming on this client context.
`boolean` `isCollocated()`
`boolean` `isDistributedJoins()`
`boolean` `isEnforceJoinOrder()`
`boolean` `isLazy()`
`boolean` `isReplicatedOnly()`
`boolean` `isSkipReducerOnUpdate()`
`boolean` `isStream()`
`boolean` `isStreamOrdered()`
`void` `orderedRequestProcessed()`
`IgniteDataStreamer<?,?>` `streamerForCache(String cacheName)`
`void` `waitTotalProcessedOrderedRequests(long total)` Waits when total processed ordered requests count to be equal to specified value.

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

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

### Constructor Detail

#### SqlClientContext

    public SqlClientContext(GridKernalContext ctx,
                            javax.cache.configuration.Factory<GridWorker> orderedBatchWorkerFactory,
                            boolean distributedJoins,
                            boolean enforceJoinOrder,
                            boolean collocated,
                            boolean replicatedOnly,
                            boolean lazy,
                            boolean skipReducerOnUpdate)

Parameters:
  `ctx` - Kernal context.
  `orderedBatchWorkerFactory` - Ordered batch worker factory.
  `distributedJoins` - Distributed joins flag.
  `enforceJoinOrder` - Enforce join order flag.
  `collocated` - Collocated flag.
  `replicatedOnly` - Replicated caches only flag.
  `lazy` - Lazy query execution flag.
  `skipReducerOnUpdate` - Skip reducer on update flag.

### Method Detail

#### enableStreaming

    public void enableStreaming(boolean allowOverwrite,
                                long flushFreq,
                                int perNodeBufSize,
                                int perNodeParOps,
                                boolean ordered)

Turn on streaming on this client context.

Parameters:
  `allowOverwrite` - Whether streaming should overwrite existing values.
  `flushFreq` - Flush frequency for streamers.
  `perNodeBufSize` - Per node streaming buffer size.
  `perNodeParOps` - Per node streaming parallel operations number.
  `ordered` - Ordered stream flag.

#### disableStreaming

    public void disableStreaming()

Turn off streaming on this client context - with closing all open streamers, if any.

#### isCollocated

    public boolean isCollocated()

Returns:
  Collocated flag.

#### isDistributedJoins

    public boolean isDistributedJoins()

Returns:
  Distributed joins flag.

#### isEnforceJoinOrder

    public boolean isEnforceJoinOrder()

Returns:
  Enforce join order flag.

#### isReplicatedOnly

    public boolean isReplicatedOnly()

Returns:
  Replicated caches only flag.

#### isLazy

    public boolean isLazy()

Returns:
  Lazy query execution flag.

#### isSkipReducerOnUpdate

    public boolean isSkipReducerOnUpdate()

Returns:
  Skip reducer on update flag,

#### isStream

    public boolean isStream()

Returns:
  Streaming state flag (on or off).

#### isStreamOrdered

    public boolean isStreamOrdered()

Returns:
  Stream ordered flag.

#### streamerForCache

    public IgniteDataStreamer<?,?> streamerForCache(String cacheName)

Parameters:
  `cacheName` - Cache name.
Returns:
  Streamer for given cache.

#### waitTotalProcessedOrderedRequests

    public void waitTotalProcessedOrderedRequests(long total)

Waits when total processed ordered requests count to be equal to specified value.

Parameters:
  `total` - Expected total processed request.

#### orderedRequestProcessed

    public void orderedRequestProcessed()

#### close

    public void close()
               throws Exception

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

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019