Class CounterSnapshotSubscriber
- java.lang.Object
-
- com.aitusoftware.aether.transport.CounterSnapshotSubscriber
-
- All Implemented Interfaces:
io.aeron.logbuffer.FragmentHandler,java.lang.AutoCloseable
public final class CounterSnapshotSubscriber extends java.lang.Object implements io.aeron.logbuffer.FragmentHandler, java.lang.AutoCloseableA listener to data published by aCounterSnapshotPublisher.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCounterSnapshotSubscriber.ContextConfiguration context.
-
Constructor Summary
Constructors Constructor Description CounterSnapshotSubscriber()Creates a new subscriber using runtime configuration.CounterSnapshotSubscriber(CounterSnapshotSubscriber.Context context)Creates a new subscriber from the supplied context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intdoWork()Poll the AeronSubscription.voidonFragment(org.agrona.DirectBuffer buffer, int offset, int length, io.aeron.logbuffer.Header header)
-
-
-
Constructor Detail
-
CounterSnapshotSubscriber
public CounterSnapshotSubscriber()
Creates a new subscriber using runtime configuration.
-
CounterSnapshotSubscriber
public CounterSnapshotSubscriber(CounterSnapshotSubscriber.Context context)
Creates a new subscriber from the supplied context.- Parameters:
context- configuration context
-
-
Method Detail
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
onFragment
public void onFragment(org.agrona.DirectBuffer buffer, int offset, int length, io.aeron.logbuffer.Header header)- Specified by:
onFragmentin interfaceio.aeron.logbuffer.FragmentHandler
-
doWork
public int doWork()
Poll the AeronSubscription.- Returns:
- number of fragments processed
-
-