Class TableDataServiceData
java.lang.Object
com.illumon.iris.db.v2.routing.impl.yaml.TableDataServiceData
- All Implemented Interfaces:
DataRoutingService.PropertyProvider
,ServiceRegistryConfig
,TableDataServiceConfig
,NamedImplementation
public class TableDataServiceData
extends Object
implements TableDataServiceConfig, DataRoutingService.PropertyProvider
Holds raw configuration data for a TDS. This represents several types of TDS -
including local, remote, and composite.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
this property on a TableDataServiceData indicates that the delegates are a failover group -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends TableDataServiceConfig>
getName()
Return all properties as a map.Returns the value populated for 'serviceregistry' tag under endpoints sub-config.getTags()
boolean
isRemote()
static TableDataServiceConfig
makeComposingTableDataServiceConfig
(String name, String description, List<String> tags, Filter filter, List<TableDataServiceConfig> sources, Map<String, String> properties, DataRoutingService.EndpointConfig endpointConfig) Construct a TableDataServiceData, given the inputs that represent a composing/delegating TDS.static TableDataServiceConfig
makeDelegatingTableDataServiceConfig
(String sourceName, String description, Filter filter, List<TableDataServiceConfig> delegates) Construct a TableDataServiceData, given the inputs that represent local delegation.static TableDataServiceData
makeGroupTableDataServiceConfig
(String sourceName, String description, Filter filter, List<TableDataServiceConfig> delegates) Construct a TableDataServiceData, given the inputs that represent a failover group.static TableDataServiceConfig
makeLocalTableDataServiceConfig
(String name, String description, List<String> tags, Filter filter, StorageData storage, Map<String, String> properties, DataRoutingService.EndpointConfig endpointConfig) Construct a TableDataServiceData, given the inputs that represent a (remote) local table data service.static TableDataServiceConfig
makeRemoteTableDataServiceConfig
(String name, String description, List<String> tags, Filter filter, Map<String, String> properties, DataRoutingService.EndpointConfig endpointConfig) Construct a TableDataServiceConfig, given the inputs that represent a remote TDS.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.routing.DataRoutingService.PropertyProvider
getProperty, getProperty
Methods inherited from interface com.illumon.util.type.NamedImplementation
getImplementationName
Methods inherited from interface com.illumon.iris.db.v2.routing.TableDataServiceConfig
toStringHelper
-
Field Details
-
FAILOVER_GROUP_PROP
this property on a TableDataServiceData indicates that the delegates are a failover group- See Also:
-
-
Method Details
-
makeRemoteTableDataServiceConfig
public static TableDataServiceConfig makeRemoteTableDataServiceConfig(@NotNull String name, @Nullable String description, @NotNull List<String> tags, @NotNull Filter filter, @NotNull Map<String, String> properties, @NotNull DataRoutingService.EndpointConfig endpointConfig) Construct a TableDataServiceConfig, given the inputs that represent a remote TDS.- Parameters:
name
- name for this servicedescription
- description of this servicetags
- tags associated with this servicefilter
- the filterproperties
- local configuration properties for this table data serviceendpointConfig
- configuration for a remote table data service endpoint.- Returns:
- a new TableDataServiceConfig
-
makeComposingTableDataServiceConfig
public static TableDataServiceConfig makeComposingTableDataServiceConfig(@NotNull String name, @Nullable String description, @NotNull List<String> tags, @NotNull Filter filter, @NotNull List<TableDataServiceConfig> sources, @NotNull Map<String, String> properties, @Nullable DataRoutingService.EndpointConfig endpointConfig) Construct a TableDataServiceData, given the inputs that represent a composing/delegating TDS.- Parameters:
name
- name for this servicedescription
- description of this servicetags
- tags associated with this servicesources
- list of sourcesfilter
- the filterproperties
- local configuration properties for this table data serviceendpointConfig
- optional configuration for a remote table data service endpoint. Some configurations are used for composition (server) and RTDS (client)- Returns:
- a new TableDataServiceConfig
-
makeLocalTableDataServiceConfig
public static TableDataServiceConfig makeLocalTableDataServiceConfig(@NotNull String name, @Nullable String description, @NotNull List<String> tags, @NotNull Filter filter, @NotNull StorageData storage, @NotNull Map<String, String> properties, @NotNull DataRoutingService.EndpointConfig endpointConfig) Construct a TableDataServiceData, given the inputs that represent a (remote) local table data service.- Parameters:
name
- name for this servicedescription
- description of this servicetags
- tags associated with this servicefilter
- the filterstorage
- the storage that will be presented by this serviceproperties
- local configuration properties for this table data serviceendpointConfig
- configuration for the remote table data service endpoint- Returns:
- a new TableDataServiceConfig
-
makeDelegatingTableDataServiceConfig
public static TableDataServiceConfig makeDelegatingTableDataServiceConfig(@NotNull String sourceName, @Nullable String description, @NotNull Filter filter, @NotNull List<TableDataServiceConfig> delegates) Construct a TableDataServiceData, given the inputs that represent local delegation.- Parameters:
sourceName
- name for this servicedescription
- description of this servicefilter
- the filterdelegates
- the services to be grouped in this TDS- Returns:
- a new TableDataServiceConfig
-
makeGroupTableDataServiceConfig
public static TableDataServiceData makeGroupTableDataServiceConfig(@NotNull String sourceName, @Nullable String description, @NotNull Filter filter, @NotNull List<TableDataServiceConfig> delegates) Construct a TableDataServiceData, given the inputs that represent a failover group.- Parameters:
sourceName
- name for this servicedescription
- description of this servicefilter
- the filterdelegates
- the services to be grouped in this TDS- Returns:
- a new TableDataServiceConfig
-
getServiceRegistryType
Description copied from interface:ServiceRegistryConfig
Returns the value populated for 'serviceregistry' tag under endpoints sub-config.- Specified by:
getServiceRegistryType
in interfaceServiceRegistryConfig
-
getName
- Specified by:
getName
in interfaceTableDataServiceConfig
-
getEndpointConfig
- Specified by:
getEndpointConfig
in interfaceTableDataServiceConfig
-
getFilter
- Specified by:
getFilter
in interfaceTableDataServiceConfig
-
getStorageName
- Specified by:
getStorageName
in interfaceTableDataServiceConfig
-
getStorageRoot
- Specified by:
getStorageRoot
in interfaceTableDataServiceConfig
-
getDescription
- Specified by:
getDescription
in interfaceTableDataServiceConfig
-
getTags
- Specified by:
getTags
in interfaceTableDataServiceConfig
-
getDelegates
- Specified by:
getDelegates
in interfaceTableDataServiceConfig
-
getProperties
Description copied from interface:DataRoutingService.PropertyProvider
Return all properties as a map. This is useful for interactions outside the DB project.- Specified by:
getProperties
in interfaceDataRoutingService.PropertyProvider
- Returns:
- a map containing all keys and values for this provider
-
toString
-
isRemote
public boolean isRemote()- Specified by:
isRemote
in interfaceTableDataServiceConfig
-