Package com.illumon.iris.db.v2.routing
Interface WritableDataRoutingService
- All Superinterfaces:
AutoCloseable
,ClaimsProvider
,DataRoutingService
,EndpointResolver
,NamedImplementation
,SafeCloseable
,StorageLookup
- All Known Subinterfaces:
WritableDataRoutingServiceInternal
- All Known Implementing Classes:
DataRoutingServiceKvEtcdImpl
,DataRoutingServiceKvImpl
,DataRoutingServiceKvInMemImpl
Add mutating methods to the DataRoutingService interface.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Options for add and delete operations.Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.routing.DataRoutingService
DataRoutingService.DeferredEndpoint, DataRoutingService.Delegating, DataRoutingService.Endpoint, DataRoutingService.EndpointConfig, DataRoutingService.NonListening, DataRoutingService.NotReadyException, DataRoutingService.NullPropertyProvider, DataRoutingService.PropertyProvider
-
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.routing.DataRoutingService
DEFAULT_LOCAL_TABLE_DATA_SERVICE, DEFAULT_QUERY_SERVER_TABLE_DATA_SERVICE, DEFAULT_SELECTION_TAG, HOST_TAG, MERGE_QUERY_TDS_TAG, NULL_PROPERTY_PROVIDER, PORT_TAG, QUERY_QUERY_TDS_TAG, SERVICE_REGISTRY_NONE, SERVICE_REGISTRY_SERVICE, TABLE_DATA_PORT_TAG, TABLE_DATA_SERVICE_CONFIG_PROP, TABLE_DATA_SERVICE_CONFIG_PROPS_WITH_LEGACY, TAILER_PORT_TAG, VALIDATE_QUERY_TDS_TAG
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
addDis
(DataImportServiceConfig disConfig, String code, String comment) Add a DataImportServiceConfig to the data routing configuration.void
addDises
(Collection<DataImportServiceConfig> disConfigs, String code, String comment) Add one or more DataImportServiceConfigs to the data routing configuration.default void
Remove a DataImportServiceConfig from the data routing configuration.void
removeDises
(Collection<String> disNames, String code, String comment, WritableDataRoutingService.Options... options) Remove one or more DataImportServiceConfigs from the data routing configuration.void
replaceConfiguration
(String routingYmlString, Collection<DataImportServiceConfig> disConfigs, String code, String comment, WritableDataRoutingService.Options... options) Replace the existing base and set of configurations with the given configurations.void
Replace the existing data routing configuration.default void
updateDis
(DataImportServiceConfig disConfig, String code, String comment) Update a DataImportServiceConfig in the data routing configuration.void
updateDises
(Collection<DataImportServiceConfig> disConfigs, String code, String comment) Update one or more DataImportServiceConfigs in the data routing configuration.Methods inherited from interface com.illumon.iris.db.v2.routing.filter.claims.ClaimsProvider
getCollectedClaims, registerClaims
Methods inherited from interface com.illumon.iris.db.v2.routing.DataRoutingService
about, asYamlString, authenticate, authenticate, authenticate, getAllDataImportServiceConfigs, getAllDataImportServiceConfigs, getAllDataImportServiceDeferredDestinations, getAllDataImportServiceDestinationConfigs, getAllDataImportServiceDestinations, getAllLogAggregatorServiceConfigs, getDataImportServiceConfig, getDataImportServiceConfigWithStorage, getDataImportServiceDeferredDestinations, getDataImportServiceDestinationConfigs, getDataImportServiceDestinations, getLocalInstance, getLogAggregatorConfig, getLogAggregatorDeferredDestination, getLogAggregatorDestination, getLogAggregatorDestinationConfig, getTableDataServiceConfig, getTableDataServiceConfigs, listen, removeListener, supportsChangeNotification
Methods inherited from interface com.illumon.iris.db.v2.routing.endpoint.EndpointResolver
resolveLogAggregatorEndpoint, resolveTableDataEndpoint, resolveTailerEndpoint
Methods inherited from interface com.illumon.util.type.NamedImplementation
getImplementationName
Methods inherited from interface com.illumon.util.SafeCloseable
close
Methods inherited from interface com.illumon.iris.db.v2.routing.dynamicdis.StorageLookup
getStorage
-
Method Details
-
update
Replace the existing data routing configuration.- Parameters:
ymlString
- YAML representation of the new data routing configurationcode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- pass-thru to kv persistence - a comment for this update- Throws:
DataRoutingConfigurationException
- if the updated routing configuration is invalid in any way
-
addDis
default void addDis(@NotNull DataImportServiceConfig disConfig, @NotNull String code, @NotNull String comment) Add a DataImportServiceConfig to the data routing configuration. The disConfig will be checked as it is added, ensuring that the configuration as a whole is valid.- Parameters:
disConfig
- the DataImportServiceConfig to addcode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- pass-thru to kv persistence - a comment for this update- Throws:
DataRoutingConfigurationException
- if the disConfig is already present, or if the updated routing configuration is invalid in any way
-
addDises
void addDises(@NotNull Collection<DataImportServiceConfig> disConfigs, @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 addcode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- 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
-
updateDis
default void updateDis(@NotNull DataImportServiceConfig disConfig, @NotNull String code, @NotNull String comment) Update a DataImportServiceConfig in the data routing configuration. The disConfig will be checked as it is updated, ensuring that the configuration as a whole is valid.- Parameters:
disConfig
- the DataImportServiceConfig to updatecode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- pass-thru to kv persistence - a comment for this update- Throws:
DataRoutingConfigurationException
- if the updated routing configuration is invalid in any way
-
updateDises
void updateDises(@NotNull Collection<DataImportServiceConfig> disConfigs, @NotNull String code, @NotNull String comment) Update one or more DataImportServiceConfigs in the data routing configuration. Configurations that do not exist will be added. The disConfigs will be checked as they are updated, ensuring that the configuration as a whole is valid.- Parameters:
disConfigs
- the DataImportServiceConfigs to updatecode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- pass-thru to kv persistence - a comment for this update- Throws:
DataRoutingConfigurationException
- if the updated routing configuration is invalid in any way
-
replaceConfiguration
void replaceConfiguration(@Nullable String routingYmlString, @NotNull Collection<DataImportServiceConfig> disConfigs, @NotNull String code, @NotNull String comment, WritableDataRoutingService.Options... options) Replace the existing base and set of configurations with the given configurations. Any existing DIS 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 addcode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- pass-thru to kv persistence - a comment for this updateoptions
- 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
-
removeDis
Remove a DataImportServiceConfig from the data routing configuration. The named dis must exist, as a separately added configuration (not inline in the main file). The routing configuration will be checked as it is removed, ensuring that the configuration as a whole is valid.- Parameters:
disName
- the name of the DataImportServiceConfig to removecode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- pass-thru to kv persistence - a comment for this update- Throws:
DataRoutingConfigurationException
- if the updated routing configuration is invalid in any way
-
removeDises
void removeDises(@NotNull Collection<String> disNames, @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 separately added configurations (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 removecode
- pass-thru to kv persistence, indicates the code source of this updatecomment
- pass-thru to kv persistence - a comment for this updateoptions
- ifWritableDataRoutingService.Options.LENIENT
is given, it is not considered an error if any of the named dises do not exist. ifWritableDataRoutingService.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
-