Package com.illumon.iris.db.v2.routing
Class DataRoutingService.Delegating
java.lang.Object
com.illumon.iris.db.v2.routing.DataRoutingService.Delegating
- All Implemented Interfaces:
DataRoutingService
,StorageLookup
,EndpointResolver
,ClaimsProvider
,SafeCloseable
,NamedImplementation
,AutoCloseable
- Direct Known Subclasses:
DataRoutingServiceCachingImpl
,DataRoutingServiceK8sImpl
,DataRoutingServiceKvImpl
- Enclosing interface:
- DataRoutingService
public abstract static class DataRoutingService.Delegating
extends Object
implements DataRoutingService
Delegate method calls to an implementation object.
This is designed to be subclassed.
-
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
-
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
about()
Information about a DataRoutingService instance.Serialize the data routing as a YAML string.void
close()
getAllDataImportServiceConfigs
(boolean excludeCoreConfigs) Get all DIS configs, optionally excluding core configs (those defined in the main routing yml file) For consumption by administrative tools.Collection<? extends DataImportServiceConfig.EndpointConfig>
Get all known DataImportServer destination configs.Collection<? extends LogAggregatorConfig>
Return all log aggregator configurations.Get the current claims for this owner (DataRoutingService).Get DIS parameters for this named DIS instance.Collection<? extends DataImportServiceConfig.EndpointConfig>
getDataImportServiceDestinationConfigs
(TableIdentifier tableIdentifier) Get DIS destination configs for a table key.protected abstract DataRoutingService
getLogAggregatorConfig
(String configName) Get configuration for the named log aggregator service instance.getLogAggregatorDestinationConfig
(TableIdentifier tableIdentifier) Get the single LAS destination configuration for the given table key.getStorage
(String name) Get the StorageConfig associated with the given name.Information needed to configure a table data service server.Collection<? extends TableDataServiceConfig>
Get all known table data service configurations.long
listen
(DataRoutingConfigListener listener) Add a listener for changes to the DataRoutingService configuration.void
registerClaims
(DataImportServiceConfig disConfig) Register all claims for the given DataImportServiceConfig.boolean
removeListener
(DataRoutingConfigListener listener) Remove the given listener from the list of listeners.boolean
Probe the implementation to find out if change notification is supported.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.routing.DataRoutingService
authenticate, authenticate, authenticate, getAllDataImportServiceConfigs, getAllDataImportServiceDeferredDestinations, getAllDataImportServiceDestinations, getDataImportServiceConfigWithStorage, getDataImportServiceDeferredDestinations, getDataImportServiceDestinations, getLocalInstance, getLogAggregatorDeferredDestination, getLogAggregatorDestination
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
-
Constructor Details
-
Delegating
public Delegating()
-
-
Method Details
-
getDelegate
-
about
Description copied from interface:DataRoutingService
Information about a DataRoutingService instance. Useful for debugging.- Specified by:
about
in interfaceDataRoutingService
- Returns:
- a string containing information about the instance
-
getDataImportServiceConfig
Description copied from interface:DataRoutingService
Get DIS parameters for this named DIS instance. For consumption by a DIS instance or TableDataService consumer.- Specified by:
getDataImportServiceConfig
in interfaceDataRoutingService
- Parameters:
name
- DIS configuration name- Returns:
- the configuration for the named DIS, or null if it does not exist.
-
getDataImportServiceDestinationConfigs
@NotNull public Collection<? extends DataImportServiceConfig.EndpointConfig> getDataImportServiceDestinationConfigs(@NotNull TableIdentifier tableIdentifier) Description copied from interface:DataRoutingService
Get DIS destination configs for a table key. For consumption by a Tailer.- Specified by:
getDataImportServiceDestinationConfigs
in interfaceDataRoutingService
- 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.
-
getAllDataImportServiceConfigs
@NotNull public Map<String,DataImportServiceConfig> getAllDataImportServiceConfigs(boolean excludeCoreConfigs) Description copied from interface:DataRoutingService
Get all DIS configs, optionally excluding core configs (those defined in the main routing yml file) For consumption by administrative tools.- Specified by:
getAllDataImportServiceConfigs
in interfaceDataRoutingService
- Parameters:
excludeCoreConfigs
- if true, exclude core configs- Returns:
- a possibly empty collection of all/non-core DIS configs
-
getAllDataImportServiceDestinationConfigs
@NotNull public Collection<? extends DataImportServiceConfig.EndpointConfig> getAllDataImportServiceDestinationConfigs()Description copied from interface:DataRoutingService
Get all known DataImportServer destination configs. This includes destination configs with disabled tailer ports. For consumption by a Tailer.- Specified by:
getAllDataImportServiceDestinationConfigs
in interfaceDataRoutingService
- Returns:
- a possibly null collection of all known DIS destinations.
-
getLogAggregatorConfig
Description copied from interface:DataRoutingService
Get configuration for the named log aggregator service instance.- Specified by:
getLogAggregatorConfig
in interfaceDataRoutingService
- Parameters:
configName
- the LAS configuration name- Returns:
- the configuration for the named log aggregator, no null if it does not exist
-
getAllLogAggregatorServiceConfigs
Description copied from interface:DataRoutingService
Return all log aggregator configurations.- Specified by:
getAllLogAggregatorServiceConfigs
in interfaceDataRoutingService
- Returns:
- a collection of all configured log aggregators.
-
getLogAggregatorDestinationConfig
@Nullable public LogAggregatorConfig.EndpointConfig getLogAggregatorDestinationConfig(@NotNull TableIdentifier tableIdentifier) Description copied from interface:DataRoutingService
Get the single LAS destination configuration for the given table key.- Specified by:
getLogAggregatorDestinationConfig
in interfaceDataRoutingService
- 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
Description copied from interface:DataRoutingService
Information needed to configure a table data service server. For use by a TableDataService provider (LocalTableDataServer
,TableDataCacheProxy
).- Specified by:
getTableDataServiceConfig
in interfaceDataRoutingService
- Parameters:
name
- configuration name- Returns:
- the named TableDataServiceConfig, or null if not found.
-
getTableDataServiceConfigs
Description copied from interface:DataRoutingService
Get all known table data service configurations. The data includes name description and tags.- Specified by:
getTableDataServiceConfigs
in interfaceDataRoutingService
- Returns:
- all known TableDataServiceConfigs
-
asYamlString
Description copied from interface:DataRoutingService
Serialize the data routing as a YAML string. Internal use only.- Specified by:
asYamlString
in interfaceDataRoutingService
- Returns:
- YAML representation of the configuration
-
getStorage
Description copied from interface:StorageLookup
Get the StorageConfig associated with the given name.- Specified by:
getStorage
in interfaceStorageLookup
- Parameters:
name
- The name of the storage to look up. May be null, in which case null will always be returned.- Returns:
- The storage config, or null if not found
-
getCollectedClaims
Description copied from interface:ClaimsProvider
Get the current claims for this owner (DataRoutingService).- Specified by:
getCollectedClaims
in interfaceClaimsProvider
- Returns:
- the current CollectedClaims
-
registerClaims
Description copied from interface:ClaimsProvider
Register all claims for the given DataImportServiceConfig.- Specified by:
registerClaims
in interfaceClaimsProvider
- Parameters:
disConfig
- The DIS config to register
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-
supportsChangeNotification
public boolean supportsChangeNotification()Description copied from interface:DataRoutingService
Probe the implementation to find out if change notification is supported.- Specified by:
supportsChangeNotification
in interfaceDataRoutingService
- Returns:
- true if change notifications are supported.
-
listen
Description copied from interface:DataRoutingService
Add a listener for changes to the DataRoutingService configuration.- Specified by:
listen
in interfaceDataRoutingService
- Parameters:
listener
- configuration change notices will be published to this listener- Returns:
- the current configuration version
-
removeListener
Description copied from interface:DataRoutingService
Remove the given listener from the list of listeners.- Specified by:
removeListener
in interfaceDataRoutingService
- Parameters:
listener
- the listener to remove- Returns:
- true if a listener was removed, false if it could not be found or could not be removed
-