Package com.aitusoftware.aether.event
Class SystemSnapshot
- java.lang.Object
-
- com.aitusoftware.aether.event.SystemSnapshot
-
- All Implemented Interfaces:
CounterSnapshotListener
public final class SystemSnapshot extends java.lang.Object implements CounterSnapshotListener
Maintains an aggregate view over multiple MediaDriver snapshots.
-
-
Constructor Summary
Constructors Constructor Description SystemSnapshot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<StreamKey,java.util.Map<ChannelSessionKey,java.util.Set<ChannelSessionKey>>>getConnectionsByStream()Returns a tree-like structure identifying participants in individual message flows.PublisherCounterSetgetPublisherCounterSet(ChannelSessionKey channelSessionKey)Returns the publisher counters associated with a particular publisher.SubscriberCounterSetgetSubscriberCounterSet(ChannelSessionKey channelSessionKey)Returns the subscriber counters associated with a particular subscriber.java.util.Map<java.lang.String,SystemCounters>getSystemCounters()Returns system counters keyed by MediaDriver label.voidonSnapshot(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.
-
-
-
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:
onSnapshotin interfaceCounterSnapshotListener- Parameters:
label- label of the MediaDrivertimestamp- timestamp of the snapshotpublisherCounters- counters describing publisher statesubscriberCounters- counters describing subscriber statesystemCounters- counters describing system state
-
getSystemCounters
public java.util.Map<java.lang.String,SystemCounters> getSystemCounters()
Returns system counters keyed by MediaDriver label.- Returns:
- the system counters
-
getConnectionsByStream
public java.util.Map<StreamKey,java.util.Map<ChannelSessionKey,java.util.Set<ChannelSessionKey>>> getConnectionsByStream()
Returns a tree-like structure identifying participants in individual message flows.- Returns:
- the structure of identifiers
-
getPublisherCounterSet
public PublisherCounterSet getPublisherCounterSet(ChannelSessionKey channelSessionKey)
Returns the publisher counters associated with a particular publisher.- Parameters:
channelSessionKey- the identifier of the publisher- Returns:
- the publisher counters
-
getSubscriberCounterSet
public SubscriberCounterSet getSubscriberCounterSet(ChannelSessionKey channelSessionKey)
Returns the subscriber counters associated with a particular subscriber.- Parameters:
channelSessionKey- the identifier of the subscriber- Returns:
- the subscriber counters
-
-