Class DefaultTopic<T>
java.lang.Object
io.aleph0.yap.core.transport.topic.DefaultTopic<T>
- All Implemented Interfaces:
Measureable<Topic.Metrics>,Topic<T>,AutoCloseable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.aleph0.yap.core.transport.Topic
Topic.Metrics -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> DefaultTopic.Builder<T> builder()Non-destructive check of the metrics.voidclose()Destructive read of the metrics.void
-
Constructor Details
-
DefaultTopic
-
-
Method Details
-
builder
-
publish
- Specified by:
publishin interfaceTopic<T>- Throws:
InterruptedException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTopic<T>
-
checkMetrics
Description copied from interface:MeasureableNon-destructive check of the metrics. This should be used to check the state of metrics without clearing them, for example in aTaskController.- Specified by:
checkMetricsin interfaceMeasureable<T>- Returns:
- the metrics
-
flushMetrics
Description copied from interface:MeasureableDestructive read of the metrics. This should be used to check and reset the state of metrics, for example by the metrics checking thread.- Specified by:
flushMetricsin interfaceMeasureable<T>- Returns:
- the metrics
-