Package io.deephaven.server.arrow
Class ExchangeMarshallerModule
java.lang.Object
io.deephaven.server.arrow.ExchangeMarshallerModule
A dagger module that provides
exchange marshallers
and
handlers
for use by the
ArrowFlightUtil
DoExchangeMarshaller
, loaded using a ServiceLoader
constructed with the
injected Scheduler
, SessionService.ErrorTransformer
and
BarrageMessageWriter.Factory
parameters.
Note, the user of the ExchangeMarshaller set must sort the marshallers according to priority. The set cannot be sorted at our injection point, because there may be multiple @ElementsIntoSet injectors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
To add an additionalExchangeMarshaller
, implement this Factory and add it as a service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<ExchangeMarshaller>
provideExchangeMarshallers
(Scheduler scheduler, SessionService.ErrorTransformer errorTransformer, BarrageMessageWriter.Factory streamGeneratorFactory) static Set<ExchangeRequestHandlerFactory>
static List<ExchangeMarshaller>
sortMarshallersByPriority
(@NotNull Set<ExchangeMarshaller> marshallers) Multiple modules could have injected a marshaller, we must sort the complete list by priority.
-
Constructor Details
-
ExchangeMarshallerModule
public ExchangeMarshallerModule()
-
-
Method Details
-
sortMarshallersByPriority
@Provides public static List<ExchangeMarshaller> sortMarshallersByPriority(@NotNull @NotNull Set<ExchangeMarshaller> marshallers) Multiple modules could have injected a marshaller, we must sort the complete list by priority.- Parameters:
marshallers
- the input set of marshallers- Returns:
- the marshallers sorted in ascending priority.
-
provideExchangeMarshallers
@Provides @ElementsIntoSet public static Set<ExchangeMarshaller> provideExchangeMarshallers(Scheduler scheduler, SessionService.ErrorTransformer errorTransformer, BarrageMessageWriter.Factory streamGeneratorFactory) -
provideRequestHandlers
@Provides @ElementsIntoSet public static Set<ExchangeRequestHandlerFactory> provideRequestHandlers()
-