Interface WritableDataRoutingServiceInternal

All Superinterfaces:
AutoCloseable, ClaimsProvider, DataRoutingService, EndpointResolver, NamedImplementation, SafeCloseable, StorageLookup, WritableDataRoutingService
All Known Implementing Classes:
DataRoutingServiceKvEtcdImpl, DataRoutingServiceKvImpl, DataRoutingServiceKvInMemImpl

public interface WritableDataRoutingServiceInternal extends WritableDataRoutingService
Usable only by this package for kv implementation. Note: this is separate from WritableDataRoutingService in an attempt to reduce scope of the user parameter.
  • Method Details

    • update

      void update(@NotNull byte[] yamldata, @NotNull String user, @NotNull String code, @NotNull String comment)
      Replace the existing data routing configuration.
      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
      Throws:
      DataRoutingConfigurationException - if the complete configuration can't be parsed with the new configuration included
    • addDises

      void addDises(@NotNull Collection<DataImportServiceConfig> disConfigs, @NotNull String user, @NotNull String code, @NotNull String comment)
      Add one or more DataImportServiceConfigs to the data routing configuration. The disConfigs will be checked as they are added, ensuring that the configuration as a whole is valid.
      Parameters:
      disConfigs - the DataImportServiceConfigs to add
      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
      Throws:
      DataRoutingConfigurationException - if any of the disConfigs are already present, or if the updated routing configuration is invalid in any way
    • updateDises

      void updateDises(@NotNull Collection<DataImportServiceConfig> disConfigs, @NotNull String user, @NotNull String code, @NotNull String comment)
      Update one or more DataImportServiceConfigs in the data routing configuration. The disConfigs will be checked as they are updated, ensuring that the configuration as a whole is valid.
      Parameters:
      disConfigs - the DataImportServiceConfigs to update
      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
      Throws:
      DataRoutingConfigurationException - if any disConfigs do not exist in the configuration, or if the updated routing configuration is invalid in any way
    • removeDises

      void removeDises(@NotNull Collection<String> disNames, @NotNull String user, @NotNull String code, @NotNull String comment, WritableDataRoutingService.Options... options)
      Remove one or more DataImportServiceConfigs from the data routing configuration. The named dises must exist as a separately added configuration (not inline in the main file). The routing configuration will be checked as they are removed, ensuring that the configuration as a whole is valid.
      Parameters:
      disNames - the names of the DataImportServiceConfigs to remove
      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
      options - if WritableDataRoutingService.Options.LENIENT is given, it is not considered an error if any of the named dises do not exist. if WritableDataRoutingService.Options.IGNORE_ERRORS is given, any parsing errors encountered while removing the dises will be ignored. * @throws DataRoutingConfigurationException if the updated routing configuration is invalid in any way
    • replaceConfiguration

      void replaceConfiguration(@Nullable String routingYmlString, @NotNull Collection<DataImportServiceConfig> disConfigs, @NotNull String user, @NotNull String code, @NotNull String comment, WritableDataRoutingService.Options... options)
      Replace the existing set of configurations with the given collection. Any existing configurations not in disConfigs will be removed.
      Parameters:
      routingYmlString - (optional) YAML representation of the new data routing configuration. If not specified, the existing base configuration will be used.
      disConfigs - the DataImportServiceConfigs to add
      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
      options - use IGNORE_ERRORS with extreme caution. If set, any errors encountered while adding the dises will be ignored, and it is therefore possible to persist an invalid configuration.
      Throws:
      DataRoutingConfigurationException - if the updated routing configuration is invalid in any way