Table of Contents

Interface IConnectionPool

Namespace
Elasticsearch.Net
Assembly
Elasticsearch.Net.dll
public interface IConnectionPool : IDisposable
Inherited Members

Properties

LastUpdate

DateTime LastUpdate { get; }

Property Value

DateTime

MaxRetries

Returns the default maximum retries for the connection pool implementation. Most implementation default to number of nodes, note that this can be overidden in the connection settings

int MaxRetries { get; }

Property Value

int

Nodes

Returns a readonly constant view of all the nodes in the cluster, this might involve creating copies of the nodes e.g if you are using the sniffing connectionpool. If you do not need an isolated copy of the nodes please read CreateView(Action<AuditEvent, Node>) to completion

IReadOnlyCollection<Node> Nodes { get; }

Property Value

IReadOnlyCollection<Node>

SniffedOnStartup

Bookkeeps wheter this connectionpool has seen a sniff on startup. its up to to the callee to set this in a threadsafe fashion

bool SniffedOnStartup { get; set; }

Property Value

bool

SupportsPinging

bool SupportsPinging { get; }

Property Value

bool

SupportsReseeding

Signals that this implemenation can accept new nodes

bool SupportsReseeding { get; }

Property Value

bool

UsingSsl

Whether or not SSL is being using

bool UsingSsl { get; }

Property Value

bool

Methods

CreateView(Action<AuditEvent, Node>)

Creates a view with changing starting positions that wraps over on each call e.g Thread A might get 1,2,3,4,5 and thread B will get 2,3,4,5,1. if there are no live nodes yields a different dead node to try once

IEnumerable<Node> CreateView(Action<AuditEvent, Node> audit = null)

Parameters

audit Action<AuditEvent, Node>

Returns

IEnumerable<Node>

Reseed(IEnumerable<Node>)

Update the node list, it's the IConnectionPool's responsibility to do so in a threadsafe fashion

void Reseed(IEnumerable<Node> nodes)

Parameters

nodes IEnumerable<Node>