Skip to content

Commit 7cb2c70

Browse files
committed
Add product check status to connection pool
1 parent 0ea5281 commit 7cb2c70

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

src/Elasticsearch.Net/ConnectionPool/IConnectionPool.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ namespace Elasticsearch.Net
1010
public interface IConnectionPool : IDisposable
1111
{
1212
/// <summary>
13-
/// The last time that this instance was updated
13+
/// The last time that this instance was updated.
1414
/// </summary>
1515
DateTime LastUpdate { get; }
1616

1717
/// <summary>
1818
/// Returns the default maximum retries for the connection pool implementation.
19-
/// Most implementation default to number of nodes, note that this can be overidden
20-
/// in the connection settings
19+
/// Most implementation default to number of nodes, note that this can be overridden
20+
/// in the connection settings.
2121
/// </summary>
2222
int MaxRetries { get; }
2323

2424
/// <summary>
2525
/// Returns a read only view of all the nodes in the cluster, which might involve creating copies of nodes e.g
2626
/// if you are using <see cref="SniffingConnectionPool" />.
27-
/// If you do not need an isolated copy of the nodes, please read <see cref="CreateView" /> to completion
27+
/// If you do not need an isolated copy of the nodes, please read <see cref="CreateView" /> to completion.
2828
/// </summary>
2929
IReadOnlyCollection<Node> Nodes { get; }
3030

@@ -34,6 +34,12 @@ public interface IConnectionPool : IDisposable
3434
/// </summary>
3535
bool SniffedOnStartup { get; set; }
3636

37+
/// <summary>
38+
/// Whether a product check is seen on startup. The implementation is
39+
/// responsible for setting this in a thread safe fashion.
40+
/// </summary>
41+
ProductCheckStatus ProductCheckStatus { get; set; }
42+
3743
/// <summary>
3844
/// Whether pinging is supported
3945
/// </summary>

src/Elasticsearch.Net/ConnectionPool/SingleNodeConnectionPool.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public bool SniffedOnStartup
3434
set { }
3535
}
3636

37+
/// <inheritdoc />
38+
public ProductCheckStatus ProductCheckStatus { get; set; }
39+
3740
/// <inheritdoc />
3841
public bool SupportsPinging => false;
3942

src/Elasticsearch.Net/ConnectionPool/StaticConnectionPool.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ private void Initialize(IEnumerable<Node> nodes, IDateTimeProvider dateTimeProvi
7575
/// <inheritdoc />
7676
public bool SniffedOnStartup { get; set; }
7777

78+
/// <inheritdoc />
79+
public ProductCheckStatus ProductCheckStatus { get; set; }
80+
7881
/// <inheritdoc />
7982
public virtual bool SupportsPinging => true;
8083

0 commit comments

Comments
 (0)