Package com.illumon.iris.db.v2.routing
Interface DataRoutingService
- All Superinterfaces:
AutoCloseable
,EndpointResolver
,NamedImplementation
,SafeCloseable
- All Known Subinterfaces:
WritableDataRoutingService
,WritableDataRoutingServiceImpl
- All Known Implementing Classes:
DataRoutingService.Delegating
,DataRoutingServiceK8sImpl
,DataRoutingServiceKvEtcdImpl
,DataRoutingServiceKvImpl
,DataRoutingServiceKvInMemImpl
,DataRoutingServiceYmlImpl
,DataRoutingServiceYmlImpl.ResolvingImpl
public interface DataRoutingService extends EndpointResolver, NamedImplementation, SafeCloseable
Interfaces for a Data Routing Service. This service provides configuration for:
- DataImportService servers
- Tailers
- Loggers
- TableDataService Proxies
- Workers
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DataRoutingService.DeferredEndpoint
Interface that defines an endpoint that if not currently realized will be realized in futurestatic class
DataRoutingService.Delegating
Delegate method calls to an implementation object.static interface
DataRoutingService.Endpoint
Defines a usable network addressstatic interface
DataRoutingService.EndpointConfig
Configuration for resolving an endpoint.static class
DataRoutingService.NotReadyException
static class
DataRoutingService.NullPropertyProvider
Implementation of "no properties".static interface
DataRoutingService.PropertyProvider
Provides access to "other" configuration properties for several interfaces. -
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_LOCAL_TABLE_DATA_SERVICE
This TableDataService name is guaranteed to exist if storage is configured on the requesting host.static String
DEFAULT_QUERY_SERVER_TABLE_DATA_SERVICE
This TableDataService name represents the default TableDataService configuration name for (remote) query servers.static String
DEFAULT_SELECTION_TAG
Default configuration entrystatic String
HOST_TAG
static String
MERGE_QUERY_TDS_TAG
Table data services marked with this tag will be presented as choices in the Merge Persistent Query Configuration editor.static DataRoutingService.NullPropertyProvider
NULL_PROPERTY_PROVIDER
Singleton "no properties" provider.static String
PORT_TAG
static String
QUERY_QUERY_TDS_TAG
Table data services marked with this tag are suitable as choices in query contexts (no UI tie-in at this point).static String
SERVICE_REGISTRY_NONE
No service registry is in usestatic String
SERVICE_REGISTRY_SERVICE
Use the service registry service to register services and resolve service addressesstatic String
TABLE_DATA_PORT_TAG
static String
TABLE_DATA_SERVICE_CONFIG_PROP
This property will override the table data service configuration name requested by most processes.static String[]
TABLE_DATA_SERVICE_CONFIG_PROPS_WITH_LEGACY
This array of property names can be used to bridge between previous and current property names.static String
TAILER_PORT_TAG
static String
VALIDATE_QUERY_TDS_TAG
Table data services marked with this tag will be presented as choices in the Validate Persistent Query Configuration editor. -
Method Summary
Modifier and Type Method Description String
about()
Information about a DataRoutingService instance.String
asYamlString()
Serialize the data routing as a YAML string.default boolean
authenticate()
Authenticate using default authentication.default boolean
authenticate(String user, String password)
Authenticate using the given user and password.default boolean
authenticate(String user, String password, String operateAs)
Authenticate using the given user and password, operating as the operateAs user.default Collection<? extends DataImportServiceConfig.DeferredEndpoint>
getAllDataImportServiceDeferredDestinations()
Get all known DataImportServer destinations as Deferred Endpoints.Collection<? extends DataImportServiceConfig.EndpointConfig>
getAllDataImportServiceDestinationConfigs()
Get all known DataImportServer destination configs.default Collection<? extends DataImportServiceConfig.Endpoint>
getAllDataImportServiceDestinations()
Get all known DataImportServer destinations.Collection<? extends LogAggregatorConfig>
getAllLogAggregatorServiceConfigs()
Return all log aggregator configurations.DataImportServiceConfig
getDataImportServiceConfig(String name)
Get DIS parameters for this named DIS instance.default Collection<? extends DataImportServiceConfig.DeferredEndpoint>
getDataImportServiceDeferredDestinations(TableIdentifier tableIdentifier)
Get Deferred DIS destinations for a table key.Collection<? extends DataImportServiceConfig.EndpointConfig>
getDataImportServiceDestinationConfigs(TableIdentifier tableIdentifier)
Get DIS destination configs for a table key.default Collection<? extends DataImportServiceConfig.Endpoint>
getDataImportServiceDestinations(TableIdentifier tableIdentifier)
Get DIS destinations for a table key.LogAggregatorConfig
getLogAggregatorConfig(String configName)
Get configuration for the named log aggregator service instance.default LogAggregatorConfig.DeferredEndpoint
getLogAggregatorDeferredDestination(TableIdentifier tableIdentifier)
Get the single Deferred LAS destination for the given table key.default LogAggregatorConfig.Endpoint
getLogAggregatorDestination(TableIdentifier tableIdentifier)
Get the single LAS destination for the given table key.LogAggregatorConfig.EndpointConfig
getLogAggregatorDestinationConfig(TableIdentifier tableIdentifier)
Get the single LAS destination configuration for the given table key.TableDataServiceConfig
getTableDataServiceConfig(String name)
Information needed to configure a table data service server.Collection<? extends TableDataServiceConfig>
getTableDataServiceConfigs()
Get all known table data service configurations.Methods inherited from interface com.illumon.iris.db.v2.routing.endpoint.EndpointResolver
resolveLogAggregatorEndpoint, resolveTableDataEndpoint, resolveTailerEndpoint
-
Field Details
-
DEFAULT_LOCAL_TABLE_DATA_SERVICE
This TableDataService name is guaranteed to exist if storage is configured on the requesting host.- See Also:
- Constant Field Values
-
DEFAULT_QUERY_SERVER_TABLE_DATA_SERVICE
This TableDataService name represents the default TableDataService configuration name for (remote) query servers.- See Also:
- Constant Field Values
-
TABLE_DATA_SERVICE_CONFIG_PROP
This property will override the table data service configuration name requested by most processes.- See Also:
- Constant Field Values
-
TABLE_DATA_SERVICE_CONFIG_PROPS_WITH_LEGACY
This array of property names can be used to bridge between previous and current property names. -
MERGE_QUERY_TDS_TAG
Table data services marked with this tag will be presented as choices in the Merge Persistent Query Configuration editor.- See Also:
- Constant Field Values
-
VALIDATE_QUERY_TDS_TAG
Table data services marked with this tag will be presented as choices in the Validate Persistent Query Configuration editor.- See Also:
- Constant Field Values
-
QUERY_QUERY_TDS_TAG
Table data services marked with this tag are suitable as choices in query contexts (no UI tie-in at this point).- See Also:
- Constant Field Values
-
DEFAULT_SELECTION_TAG
Default configuration entry- See Also:
- Constant Field Values
-
SERVICE_REGISTRY_NONE
No service registry is in use- See Also:
- Constant Field Values
-
SERVICE_REGISTRY_SERVICE
Use the service registry service to register services and resolve service addresses- See Also:
- Constant Field Values
-
HOST_TAG
- See Also:
- Constant Field Values
-
PORT_TAG
- See Also:
- Constant Field Values
-
TAILER_PORT_TAG
- See Also:
- Constant Field Values
-
TABLE_DATA_PORT_TAG
- See Also:
- Constant Field Values
-
NULL_PROPERTY_PROVIDER
Singleton "no properties" provider.
-
-
Method Details
-
about
String about()Information about a DataRoutingService instance. Useful for debugging.- Returns:
- a string containing information about the instance
-
authenticate
default boolean authenticate()Authenticate using default authentication. This will be using the default private key or howeverAuthenticationClientManager.getDefault()
has been authenticated.- Returns:
- true only if the authentication succeeded
-
authenticate
Authenticate using the given user and password. Implementations are not required to allow re-authentication.- Parameters:
user
- the user to authenticatepassword
- the password for the user- Returns:
- true only if the authentication succeeded
-
authenticate
default boolean authenticate(@NotNull String user, @NotNull String password, @NotNull String operateAs)Authenticate using the given user and password, operating as the operateAs user. Implementations are not required to allow re-authentication.- Parameters:
user
- the user to authenticatepassword
- the password for the useroperateAs
- attempt to operate as this effective user- Returns:
- true only if the authentication succeeded
-
getDataImportServiceConfig
Get DIS parameters for this named DIS instance. For consumption by a DIS instance or TableDataService consumer.- Parameters:
name
- DIS configuration name- Returns:
- the configuration for the named DIS, or null if it does not exist.
-
getDataImportServiceDestinations
@NotNull default Collection<? extends DataImportServiceConfig.Endpoint> getDataImportServiceDestinations(@NotNull TableIdentifier tableIdentifier) throws IOExceptionGet DIS destinations for a table key. For consumption by a Tailer.- Parameters:
tableIdentifier
- the identifier of the data to be logged- Returns:
- a possibly empty collection of DIS destinations that should receive data for the given table.
- Throws:
IOException
- orDataRoutingService.NotReadyException
if any destination cannot be fully resolved- ImplNote:
- : this delegates to
EndpointResolver.resolveTailerEndpoint(DataImportServiceConfig.EndpointConfig)
to resolve the EndpointConfig into an Endpoint.
-
getDataImportServiceDeferredDestinations
@NotNull default Collection<? extends DataImportServiceConfig.DeferredEndpoint> getDataImportServiceDeferredDestinations(@NotNull TableIdentifier tableIdentifier)Get Deferred DIS destinations for a table key. For consumption by a Tailer.- Parameters:
tableIdentifier
- the identifier of the data to be logged- Returns:
- a possibly empty collection of Deferred DIS destinations that should receive data for the given table.
- ImplNote:
- : this delegates to
EndpointResolver.resolveTailerEndpoint(DataImportServiceConfig.EndpointConfig)
to resolve the EndpointConfig into a DeferredEndpoint.
-
getDataImportServiceDestinationConfigs
@NotNull Collection<? extends DataImportServiceConfig.EndpointConfig> getDataImportServiceDestinationConfigs(@NotNull TableIdentifier tableIdentifier)Get DIS destination configs for a table key. For consumption by a Tailer.- Parameters:
tableIdentifier
- the identifier of the data to be logged- Returns:
- a possibly empty collection of DIS destinations that should receive data for the given table.
-
getAllDataImportServiceDestinations
@NotNull default Collection<? extends DataImportServiceConfig.Endpoint> getAllDataImportServiceDestinations() throws IOExceptionGet all known DataImportServer destinations. For consumption by a Tailer.- Returns:
- a possibly null collection of all known DIS destinations.
- Throws:
IOException
- orDataRoutingService.NotReadyException
if any destination cannot be fully resolved- ImplNote:
- by default, this delegates to
EndpointResolver.resolveTailerEndpoint(DataImportServiceConfig.EndpointConfig)
to resolve the EndpointConfig into an Endpoint.
-
getAllDataImportServiceDeferredDestinations
@NotNull default Collection<? extends DataImportServiceConfig.DeferredEndpoint> getAllDataImportServiceDeferredDestinations()Get all known DataImportServer destinations as Deferred Endpoints. For consumption by a Tailer.- Returns:
- a possibly null collection of all known Deferred DIS destinations.
- ImplNote:
- by default, this delegates to
EndpointResolver.resolveTailerEndpoint(DataImportServiceConfig.EndpointConfig)
to resolve the EndpointConfig into a DeferredEndpoint.
-
getAllDataImportServiceDestinationConfigs
@NotNull Collection<? extends DataImportServiceConfig.EndpointConfig> getAllDataImportServiceDestinationConfigs()Get all known DataImportServer destination configs. For consumption by a Tailer.- Returns:
- a possibly null collection of all known DIS destinations.
- ImplNote:
- by default, this delegates to
EndpointResolver.resolveTailerEndpoint(DataImportServiceConfig.EndpointConfig)
to resolve the EndpointConfig into an Endpoint.
-
getLogAggregatorConfig
Get configuration for the named log aggregator service instance.- Parameters:
configName
- the LAS configuration name- Returns:
- the configuration for the named log aggregator, no null if it does not exist
-
getAllLogAggregatorServiceConfigs
Return all log aggregator configurations.- Returns:
- a collection of all configured log aggregators.
-
getLogAggregatorDestination
@Nullable default LogAggregatorConfig.Endpoint getLogAggregatorDestination(@NotNull TableIdentifier tableIdentifier) throws IOExceptionGet the single LAS destination for the given table key.- Parameters:
tableIdentifier
- the identifier of the data to be logged- Returns:
- the LogAggregatorEndpointConfig for the given tableIdentifier, or null if none match the key.
- Throws:
IOException
- orDataRoutingService.NotReadyException
if the destination cannot be fully resolved- ImplNote:
- by default, this delegates to
EndpointResolver.resolveLogAggregatorEndpoint(LogAggregatorConfig.EndpointConfig)
to resolve the EndpointConfig into an Endpoint.
-
getLogAggregatorDeferredDestination
@Nullable default LogAggregatorConfig.DeferredEndpoint getLogAggregatorDeferredDestination(@NotNull TableIdentifier tableIdentifier)Get the single Deferred LAS destination for the given table key.- Parameters:
tableIdentifier
- the identifier of the data to be logged- Returns:
- the LogAggregatorEndpointConfig for the given tableIdentifier, or null if none match the key.
- ImplNote:
- by default, this delegates to
EndpointResolver.resolveLogAggregatorEndpoint(LogAggregatorConfig.EndpointConfig)
to resolve the EndpointConfig into a DeferredEndpoint.
-
getLogAggregatorDestinationConfig
@Nullable LogAggregatorConfig.EndpointConfig getLogAggregatorDestinationConfig(@NotNull TableIdentifier tableIdentifier)Get the single LAS destination configuration for the given table key.- Parameters:
tableIdentifier
- the identifier of the data to be logged- Returns:
- the LogAggregatorEndpoint for the given tableIdentifier, or null if none match the key.
-
getTableDataServiceConfig
Information needed to configure a table data service server. For use by a TableDataService provider (LocalTableDataServer
,TableDataCacheProxy
).- Parameters:
name
- configuration name- Returns:
- the named TableDataServiceConfig, or null if not found.
-
getTableDataServiceConfigs
Get all known table data service configurations. The data includes name description and tags.- Returns:
- all known TableDataServiceConfigs
-
asYamlString
Serialize the data routing as a YAML string. Internal use only.- Returns:
- YAML representation of the configuration
-