Class TableDataServiceFactory

java.lang.Object
io.deephaven.enterprise.tabledataservice.TableDataServiceFactory
All Implemented Interfaces:
io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.DynamicResolverMixin, io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.EndpointResolver

public class TableDataServiceFactory extends Object implements io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.DynamicResolverMixin
The standard factory for creating TableDataService instances using a DataRoutingService instance
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Each top level creation of a TableDataService requires recursive calls with access to a consistent context.

    Nested classes/interfaces inherited from interface io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.DynamicResolverMixin

    io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.DynamicResolverMixin.DeferredDISEndpointServiceRegistryImpl, io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.DynamicResolverMixin.DeferredEndpointServiceRegistryImpl, io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.DynamicResolverMixin.DeferredLASEndpointServiceRegistryImpl
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Duration
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TableDataServiceFactory(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.DataRoutingService routingService, @NotNull SchemaService schemaService, @NotNull ProtocolDriverFactory driverFactory)
    Create a non-dynamic TableDataServiceFactory using the DataRoutingService as configuration.
    TableDataServiceFactory(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.DataRoutingService routingService, @NotNull SchemaService schemaService, @NotNull ProtocolDriverFactory driverFactory, boolean dynamic)
    Create a TableDataServiceFactory using the DataRoutingService as configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    createTableDataService(@NotNull String tdsName, boolean allowIOMessageFlush, boolean forProducer)
    Create a TableDataService by name, starting by getting the named configuration from the DataRoutingService.
    Make TableDataServices for testing - do not make remote connections, and ignore the "RTDS" aspect of composing TDSs (i.e.
    protected io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.DataRoutingService
     
    makeRemoteTableDataService(@NotNull String serviceName, @NotNull RemoteTableDataServiceDescriptor rtdsDescriptor)
    Create a new RemoteTableDataService, allowing for subclass overrides for testing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.endpoint.DynamicResolverMixin

    resolveLogAggregatorEndpoint, resolveTableDataEndpoint, resolveTailerEndpoint
  • Field Details

    • DEFAULT_TABLE_DATA_SERVICE_REQUEST_TIMEOUT

      public static final Duration DEFAULT_TABLE_DATA_SERVICE_REQUEST_TIMEOUT
  • Constructor Details

    • TableDataServiceFactory

      public TableDataServiceFactory(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.DataRoutingService routingService, @NotNull @NotNull SchemaService schemaService, @NotNull @NotNull ProtocolDriverFactory driverFactory, boolean dynamic)
      Create a TableDataServiceFactory using the DataRoutingService as configuration.
      Parameters:
      routingService - the DataRoutingService
      schemaService - the SchemaService
      driverFactory - the ProtocolDriverFactory
      dynamic - if true, listen for changes to the routing service and update dynamic TableDataServices
    • TableDataServiceFactory

      public TableDataServiceFactory(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.DataRoutingService routingService, @NotNull @NotNull SchemaService schemaService, @NotNull @NotNull ProtocolDriverFactory driverFactory)
      Create a non-dynamic TableDataServiceFactory using the DataRoutingService as configuration.
      Parameters:
      routingService - the DataRoutingService
      schemaService - the SchemaService
      driverFactory - the ProtocolDriverFactory
  • Method Details

    • getLocalRoutingService

      protected io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.DataRoutingService getLocalRoutingService()
    • createTableDataService

      @Nullable public @Nullable TableDataService createTableDataService(@NotNull @NotNull String tdsName, boolean allowIOMessageFlush, boolean forProducer) throws IOException
      Create a TableDataService by name, starting by getting the named configuration from the DataRoutingService.
      Parameters:
      tdsName - the name of the TableDataService to create
      allowIOMessageFlush - boolean to be passed to Remote TDS. Should be false for queries (because interruptions are expected).
      forProducer - the caller is a producer if true, else consumer. Consumers just connect to the config, producers connect to the embedded services and provide a remote TDS endpoint.
      Returns:
      a TableDataService as configured
      Throws:
      io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.routing.DataRoutingConfigurationException - if the configuration is invalid
      IOException - if there is an error connecting to a remote service
    • makeRemoteTableDataService

      protected RemoteTableDataService makeRemoteTableDataService(@NotNull @NotNull String serviceName, @NotNull @NotNull RemoteTableDataServiceDescriptor rtdsDescriptor) throws IOException
      Create a new RemoteTableDataService, allowing for subclass overrides for testing. This override assumes some of the parameters needed to construct a RemoteTableDataService. Connect to the remote service if not in test mode.
      Parameters:
      serviceName - the name to give the remote service
      rtdsDescriptor - all information required to configure and connect this RTDS
      Returns:
      a new, possibly connected, RemoteTableDataService
      Throws:
      IOException
    • forTesting

      public TableDataServiceFactory forTesting()
      Make TableDataServices for testing - do not make remote connections, and ignore the "RTDS" aspect of composing TDSs (i.e. TDCP). For Deephaven internal use only.
      Returns:
      this, for chaining