Search Results for

    Show / Hide Table of Contents

    Class StaticConnectionPool

    Inheritance
    object
    StaticConnectionPool
    SniffingConnectionPool
    StickyConnectionPool
    Implements
    IConnectionPool
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Net
    Assembly: OpenSearch.Net.dll
    Syntax
    public class StaticConnectionPool : IConnectionPool, IDisposable

    Constructors

    | Edit this page View Source

    StaticConnectionPool(IEnumerable<Node>, bool, IDateTimeProvider)

    Declaration
    public StaticConnectionPool(IEnumerable<Node> nodes, bool randomize = true, IDateTimeProvider dateTimeProvider = null)
    Parameters
    Type Name Description
    IEnumerable<Node> nodes
    bool randomize
    IDateTimeProvider dateTimeProvider
    | Edit this page View Source

    StaticConnectionPool(IEnumerable<Node>, bool, int?, IDateTimeProvider)

    Declaration
    protected StaticConnectionPool(IEnumerable<Node> nodes, bool randomize, int? randomizeSeed = null, IDateTimeProvider dateTimeProvider = null)
    Parameters
    Type Name Description
    IEnumerable<Node> nodes
    bool randomize
    int? randomizeSeed
    IDateTimeProvider dateTimeProvider
    | Edit this page View Source

    StaticConnectionPool(IEnumerable<Node>, Func<Node, float>, IDateTimeProvider)

    Declaration
    protected StaticConnectionPool(IEnumerable<Node> nodes, Func<Node, float> nodeScorer, IDateTimeProvider dateTimeProvider = null)
    Parameters
    Type Name Description
    IEnumerable<Node> nodes
    Func<Node, float> nodeScorer
    IDateTimeProvider dateTimeProvider
    | Edit this page View Source

    StaticConnectionPool(IEnumerable<Uri>, bool, IDateTimeProvider)

    Declaration
    public StaticConnectionPool(IEnumerable<Uri> uris, bool randomize = true, IDateTimeProvider dateTimeProvider = null)
    Parameters
    Type Name Description
    IEnumerable<Uri> uris
    bool randomize
    IDateTimeProvider dateTimeProvider

    Fields

    | Edit this page View Source

    GlobalCursor

    Declaration
    protected int GlobalCursor
    Field Value
    Type Description
    int

    Properties

    | Edit this page View Source

    AliveNodes

    Declaration
    protected List<Node> AliveNodes { get; }
    Property Value
    Type Description
    List<Node>
    | Edit this page View Source

    DateTimeProvider

    Declaration
    protected IDateTimeProvider DateTimeProvider { get; }
    Property Value
    Type Description
    IDateTimeProvider
    | Edit this page View Source

    InternalNodes

    Declaration
    protected List<Node> InternalNodes { get; set; }
    Property Value
    Type Description
    List<Node>
    | Edit this page View Source

    LastUpdate

    The last time that this instance was updated

    Declaration
    public DateTime LastUpdate { get; protected set; }
    Property Value
    Type Description
    DateTime
    | Edit this page View Source

    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

    Declaration
    public int MaxRetries { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Nodes

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

    Declaration
    public virtual IReadOnlyCollection<Node> Nodes { get; }
    Property Value
    Type Description
    IReadOnlyCollection<Node>
    | Edit this page View Source

    Random

    Declaration
    protected Random Random { get; }
    Property Value
    Type Description
    Random
    | Edit this page View Source

    Randomize

    Declaration
    protected bool Randomize { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SniffedOnStartup

    Whether a sniff is seen on startup. The implementation is responsible for setting this in a thread safe fashion.

    Declaration
    public bool SniffedOnStartup { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SupportsPinging

    Whether pinging is supported

    Declaration
    public virtual bool SupportsPinging { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SupportsReseeding

    Whether reseeding with new nodes is supported

    Declaration
    public virtual bool SupportsReseeding { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    UsingSsl

    Whether SSL/TLS is being used

    Declaration
    public bool UsingSsl { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CreateView(Action<AuditEvent, Node>)

    Creates a view of all the live nodes 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

    Declaration
    public virtual IEnumerable<Node> CreateView(Action<AuditEvent, Node> audit = null)
    Parameters
    Type Name Description
    Action<AuditEvent, Node> audit
    Returns
    Type Description
    IEnumerable<Node>
    | Edit this page View Source

    DisposeManagedResources()

    Declaration
    protected virtual void DisposeManagedResources()
    | Edit this page View Source

    Reseed(IEnumerable<Node>)

    Reseeds the nodes. The implementation is responsible for thread safety

    Declaration
    public virtual void Reseed(IEnumerable<Node> nodes)
    Parameters
    Type Name Description
    IEnumerable<Node> nodes
    | Edit this page View Source

    RetryInternalNodes(int, Action<AuditEvent, Node>)

    Declaration
    protected virtual Node RetryInternalNodes(int globalCursor, Action<AuditEvent, Node> audit = null)
    Parameters
    Type Name Description
    int globalCursor
    Action<AuditEvent, Node> audit
    Returns
    Type Description
    Node
    | Edit this page View Source

    SelectAliveNodes(int, List<Node>, Action<AuditEvent, Node>)

    Declaration
    protected virtual IEnumerable<Node> SelectAliveNodes(int cursor, List<Node> aliveNodes, Action<AuditEvent, Node> audit = null)
    Parameters
    Type Name Description
    int cursor
    List<Node> aliveNodes
    Action<AuditEvent, Node> audit
    Returns
    Type Description
    IEnumerable<Node>
    | Edit this page View Source

    SortNodes(IEnumerable<Node>)

    Declaration
    protected IOrderedEnumerable<Node> SortNodes(IEnumerable<Node> nodes)
    Parameters
    Type Name Description
    IEnumerable<Node> nodes
    Returns
    Type Description
    IOrderedEnumerable<Node>

    Implements

    IConnectionPool
    IDisposable

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • StaticConnectionPool(IEnumerable<Node>, bool, IDateTimeProvider)
      • StaticConnectionPool(IEnumerable<Node>, bool, int?, IDateTimeProvider)
      • StaticConnectionPool(IEnumerable<Node>, Func<Node, float>, IDateTimeProvider)
      • StaticConnectionPool(IEnumerable<Uri>, bool, IDateTimeProvider)
    • Fields
      • GlobalCursor
    • Properties
      • AliveNodes
      • DateTimeProvider
      • InternalNodes
      • LastUpdate
      • MaxRetries
      • Nodes
      • Random
      • Randomize
      • SniffedOnStartup
      • SupportsPinging
      • SupportsReseeding
      • UsingSsl
    • Methods
      • CreateView(Action<AuditEvent, Node>)
      • DisposeManagedResources()
      • Reseed(IEnumerable<Node>)
      • RetryInternalNodes(int, Action<AuditEvent, Node>)
      • SelectAliveNodes(int, List<Node>, Action<AuditEvent, Node>)
      • SortNodes(IEnumerable<Node>)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX