Package com.illumon.iris.db.v2.routing
Interface WritableDataRoutingServiceInternal
- All Superinterfaces:
AutoCloseable
,ClaimsProvider
,DataRoutingService
,EndpointResolver
,NamedImplementation
,SafeCloseable
,StorageLookup
,WritableDataRoutingService
- All Known Implementing Classes:
DataRoutingServiceKvEtcdImpl
,DataRoutingServiceKvImpl
,DataRoutingServiceKvInMemImpl
Usable only by this package for kv implementation.
Note: this is separate from WritableDataRoutingService in an attempt to reduce scope of the user parameter.
-
Nested Class Summary
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
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.routing.WritableDataRoutingService
WritableDataRoutingService.Options
-
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 TypeMethodDescriptionvoid
addDises
(Collection<DataImportServiceConfig> disConfigs, String user, String code, String comment) Add one or more DataImportServiceConfigs to the data routing configuration.void
removeDises
(Collection<String> disNames, String user, 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 user, String code, String comment, WritableDataRoutingService.Options... options) Replace the existing set of configurations with the given collection.void
Replace the existing data routing configuration.void
updateDises
(Collection<DataImportServiceConfig> disConfigs, String user, 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
Methods inherited from interface com.illumon.iris.db.v2.routing.WritableDataRoutingService
addDis, addDises, removeDis, removeDises, replaceConfiguration, update, updateDis, updateDises
-
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 configurationuser
- pass-thru to kv persistence, indicates the user making this changecode
- 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 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 adduser
- pass-thru to kv persistence, indicates the user making this changecode
- 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
-
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 updateuser
- pass-thru to kv persistence, indicates the user making this changecode
- 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 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 removeuser
- pass-thru to kv persistence, indicates the user making this changecode
- 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
-
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 adduser
- pass-thru to kv persistence, indicates the user making this changecode
- 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
-