Class CounterSnapshotPublisher

  • All Implemented Interfaces:
    CounterSnapshotListener, java.lang.AutoCloseable

    public final class CounterSnapshotPublisher
    extends java.lang.Object
    implements CounterSnapshotListener, java.lang.AutoCloseable
    An implementation of CounterSnapshotListener that publishes to an Aeron Publication.
    • Constructor Detail

      • CounterSnapshotPublisher

        public CounterSnapshotPublisher()
        Construct a new publisher using runtime configuration.
      • CounterSnapshotPublisher

        public CounterSnapshotPublisher​(CounterSnapshotPublisher.Context context)
        Construct a new publisher from the supplied context.
        Parameters:
        context - configuration context
    • Method Detail

      • onSnapshot

        public void onSnapshot​(java.lang.String label,
                               long timestamp,
                               java.util.List<PublisherCounterSet> publisherCounters,
                               java.util.List<SubscriberCounterSet> subscriberCounters,
                               SystemCounters systemCounters)
        Called when a complete snapshot of the counters has been built.
        Specified by:
        onSnapshot in interface CounterSnapshotListener
        Parameters:
        label - label of the MediaDriver
        timestamp - timestamp of the snapshot
        publisherCounters - counters describing publisher state
        subscriberCounters - counters describing subscriber state
        systemCounters - counters describing system state
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable