Class DataRoutingServiceKvImpl

java.lang.Object
com.illumon.iris.db.v2.routing.DataRoutingService.Delegating
com.illumon.iris.db.v2.routing.impl.kv.DataRoutingServiceKvImpl
All Implemented Interfaces:
DataRoutingService, EndpointResolver, WritableDataRoutingService, WritableDataRoutingServiceImpl, SafeCloseable, NamedImplementation, io.deephaven.kv.routing.RoutingFileContext.RoutingFileListener, io.deephaven.kv.WatchClient.StateListener<io.deephaven.kv.routing.RoutingFile>, AutoCloseable
Direct Known Subclasses:
DataRoutingServiceKvEtcdImpl, DataRoutingServiceKvInMemImpl

public abstract class DataRoutingServiceKvImpl extends DataRoutingService.Delegating implements io.deephaven.kv.routing.RoutingFileContext.RoutingFileListener, WritableDataRoutingServiceImpl
Initializes the DataRoutingService from a kv store.
  • Method Details

    • update

      public void update(@NotNull byte[] yamldata, @NotNull String code, @NotNull String comment)
      Description copied from interface: WritableDataRoutingService
      Replace the existing data routing configuration.
      Specified by:
      update in interface WritableDataRoutingService
      Parameters:
      yamldata - YAML representation of the new data routing configuration
      code - pass-thru to kv persistence, indicates the code source of this update
      comment - pass-thru to kv persistence - a comment for this update
    • update

      public void update(@NotNull byte[] yamldata, @NotNull String user, @NotNull String code, @NotNull String comment)
      Description copied from interface: WritableDataRoutingServiceImpl
      Replace the existing data routing configuration.
      Specified by:
      update in interface WritableDataRoutingServiceImpl
      Parameters:
      yamldata - YAML representation of the new data routing configuration
      user - pass-thru to kv persistence, indicates the user making this change
      code - pass-thru to kv persistence, indicates the code source of this update
      comment - pass-thru to kv persistence - a comment for this update
    • getImplementationName

      public abstract String getImplementationName()
      Description copied from interface: NamedImplementation

      Get a name for the implementing class. Useful for abstract classes that implement LogOutputAppendable or override toString.

      The default implementation is correct, but not suitable for high-frequency usage.

      Specified by:
      getImplementationName in interface NamedImplementation
      Specified by:
      getImplementationName in class DataRoutingService.Delegating
      Returns:
      A name for the implementing class
    • about

      public String about()
      Description copied from interface: DataRoutingService
      Information about a DataRoutingService instance. Useful for debugging.
      Specified by:
      about in interface DataRoutingService
      Specified by:
      about in class DataRoutingService.Delegating
      Returns:
      a string containing information about the instance
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SafeCloseable
      Overrides:
      close in class DataRoutingService.Delegating
    • asYamlString

      @NotNull public String asYamlString()
      Description copied from interface: DataRoutingService
      Serialize the data routing as a YAML string. Internal use only.
      Specified by:
      asYamlString in interface DataRoutingService
      Overrides:
      asYamlString in class DataRoutingService.Delegating
      Returns:
      YAML representation of the configuration
    • onInitialState

      public void onInitialState(@NotNull io.deephaven.kv.HeaderResponse header, @NotNull io.deephaven.kv.routing.RoutingFile state)
      Specified by:
      onInitialState in interface io.deephaven.kv.WatchClient.StateListener<io.deephaven.kv.routing.RoutingFile>
    • onInitialStateNotPresent

      public void onInitialStateNotPresent(@NotNull io.deephaven.kv.HeaderResponse header)
      Specified by:
      onInitialStateNotPresent in interface io.deephaven.kv.WatchClient.StateListener<io.deephaven.kv.routing.RoutingFile>
    • onNextState

      public void onNextState(@NotNull io.deephaven.kv.WatchResponseUnit unit, @NotNull io.deephaven.kv.routing.RoutingFile state)
      Specified by:
      onNextState in interface io.deephaven.kv.WatchClient.StateListener<io.deephaven.kv.routing.RoutingFile>
    • onNextStateNotPresent

      public void onNextStateNotPresent(@NotNull io.deephaven.kv.WatchResponseUnit unit)
      Specified by:
      onNextStateNotPresent in interface io.deephaven.kv.WatchClient.StateListener<io.deephaven.kv.routing.RoutingFile>
    • onError

      public void onError(@NotNull Throwable throwable)
      Specified by:
      onError in interface io.deephaven.kv.WatchClient.StateListener<io.deephaven.kv.routing.RoutingFile>
    • onCompleted

      public void onCompleted()
      Specified by:
      onCompleted in interface io.deephaven.kv.WatchClient.StateListener<io.deephaven.kv.routing.RoutingFile>
    • getDelegate

      protected DataRoutingService getDelegate()
      Specified by:
      getDelegate in class DataRoutingService.Delegating