From 52c8ddcd3f4fa2bbd0047b13408bd341bc8778eb Mon Sep 17 00:00:00 2001 From: James Watson Date: Mon, 5 Sep 2016 00:20:29 +0100 Subject: [PATCH] add counters reader --- RELEASE.md | 2 +- src/Adaptive.Aeron/Aeron.cs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 37613caa..0a82fefb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,4 +1,4 @@ #### Port Aeron.NET has been ported against Java version: - Agrona: 8a6cee2 -- Aeron: 649ec42 +- Aeron: 6b52dd9 diff --git a/src/Adaptive.Aeron/Aeron.cs b/src/Adaptive.Aeron/Aeron.cs index 1fa392c4..b8624973 100644 --- a/src/Adaptive.Aeron/Aeron.cs +++ b/src/Adaptive.Aeron/Aeron.cs @@ -6,6 +6,7 @@ using Adaptive.Agrona.Concurrent; using Adaptive.Agrona.Concurrent.Broadcast; using Adaptive.Agrona.Concurrent.RingBuffer; +using Adaptive.Agrona.Concurrent.Status; using Adaptive.Agrona.Util; namespace Adaptive.Aeron @@ -133,6 +134,15 @@ public Subscription AddSubscription(string channel, int streamId) return _conductor.AddSubscription(channel, streamId); } + /// + /// Create and returns a for the Aeron media driver counters. + /// + /// new for the Aeron media driver in use. + public CountersReader CountersReader() + { + return new CountersReader(_ctx.CountersMetaDataBuffer(), _ctx.CountersValuesBuffer()); + } + private Aeron Start() { AgentRunner.StartOnThread(_conductorRunner, _ctx.ThreadFactory());