Package io.deephaven.extensions.barrage
Class BarrageStreamGeneratorImpl.Factory
java.lang.Object
io.deephaven.extensions.barrage.BarrageStreamGeneratorImpl.Factory
- All Implemented Interfaces:
BarrageStreamGenerator.Factory
- Direct Known Subclasses:
BarrageStreamGeneratorImpl.ArrowFactory
- Enclosing class:
- BarrageStreamGeneratorImpl
public static class BarrageStreamGeneratorImpl.Factory
extends Object
implements BarrageStreamGenerator.Factory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetSchemaView
(@NotNull ToIntFunction<com.google.flatbuffers.FlatBufferBuilder> schemaPayloadWriter) Create a MessageView of the Schema to send as the initial message to a new subscriber.newGenerator
(BarrageMessage message, BarragePerformanceLog.WriteMetricsConsumer metricsConsumer) Create a StreamGenerator that now owns the BarrageMessage.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
newGenerator
public BarrageStreamGenerator newGenerator(BarrageMessage message, BarragePerformanceLog.WriteMetricsConsumer metricsConsumer) Description copied from interface:BarrageStreamGenerator.Factory
Create a StreamGenerator that now owns the BarrageMessage.- Specified by:
newGenerator
in interfaceBarrageStreamGenerator.Factory
- Parameters:
message
- the message that contains the update that we would like to propagatemetricsConsumer
- a method that can be used to record write metrics
-
getSchemaView
public BarrageStreamGenerator.MessageView getSchemaView(@NotNull @NotNull ToIntFunction<com.google.flatbuffers.FlatBufferBuilder> schemaPayloadWriter) Description copied from interface:BarrageStreamGenerator.Factory
Create a MessageView of the Schema to send as the initial message to a new subscriber.- Specified by:
getSchemaView
in interfaceBarrageStreamGenerator.Factory
- Parameters:
schemaPayloadWriter
- a function that writes schema data to aFlatBufferBuilder
and returns the schema offset- Returns:
- a MessageView that can be sent to a subscriber
-