Table of Contents

Class IgniteClientGroup

Namespace
Apache.Ignite
Assembly
Apache.Ignite.dll

Ignite client group. Thread safe.

Creates and maintains up to Size Ignite clients and returns them in a round-robin fashion. Ignite clients are thread safe, so there is no rent/return semantics.

Register as a singleton in DI container:
builder.Services.AddSingleton(_ => new IgniteClientGroup(
    new IgniteClientGroupConfiguration
    {
        Size = 3,
        ClientConfiguration = new("localhost"),
    }));
Invoke from a controller:
public async Task<IActionResult> Index([FromServices] IgniteClientGroup igniteGroup)
{
    IIgnite ignite = await igniteGroup.GetIgniteAsync();
    var tables = await ignite.Tables.GetTablesAsync();
    return Ok(tables);
}
public sealed class IgniteClientGroup : IDisposable
Inheritance
IgniteClientGroup
Implements
Inherited Members

Constructors

IgniteClientGroup(IgniteClientGroupConfiguration)

Initializes a new instance of the IgniteClientGroup class.

public IgniteClientGroup(IgniteClientGroupConfiguration configuration)

Parameters

configuration IgniteClientGroupConfiguration

Configuration.

Properties

Configuration

Gets the configuration.

public IgniteClientGroupConfiguration Configuration { get; }

Property Value

IgniteClientGroupConfiguration

IsDisposed

Gets a value indicating whether the group is disposed.

public bool IsDisposed { get; }

Property Value

bool

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetIgniteAsync()

Gets an Ignite client from the group. Creates a new one if necessary. Performs round-robin balancing across grouped instances.

public ValueTask<IIgnite> GetIgniteAsync()

Returns

ValueTask<IIgnite>

Ignite client.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.