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 Stringthis 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()booleanisRemote()static TableDataServiceConfigmakeComposingTableDataServiceConfig(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 TableDataServiceConfigmakeDelegatingTableDataServiceConfig(String sourceName, String description, Filter filter, TableDataServiceConfig delegate) Construct a TableDataServiceConfig, indicating the given filter should be applied before delegating to the delegate TDS.static TableDataServiceDatamakeGroupTableDataServiceConfig(String sourceName, String description, Filter filter, List<TableDataServiceConfig> delegates) Construct a TableDataServiceData, given the inputs that represent a failover group.static TableDataServiceConfigmakeLocalTableDataServiceConfig(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 TableDataServiceConfigmakeRemoteTableDataServiceConfig(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, waitMethods inherited from interface com.illumon.iris.db.v2.routing.DataRoutingService.PropertyProvider
getProperty, getPropertyMethods inherited from interface com.illumon.util.type.NamedImplementation
getImplementationNameMethods 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 TableDataServiceConfig delegate) Construct a TableDataServiceConfig, indicating the given filter should be applied before delegating to the delegate TDS. If the filter is NULL or the same as the delegate filter, the original TDS config will be returned.- Parameters:
sourceName- name for this servicedescription- description of this servicefilter- the filterdelegate- the service to be filtered 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:ServiceRegistryConfigReturns the value populated for 'serviceregistry' tag under endpoints sub-config.- Specified by:
getServiceRegistryTypein interfaceServiceRegistryConfig
-
getName
- Specified by:
getNamein interfaceTableDataServiceConfig
-
getEndpointConfig
- Specified by:
getEndpointConfigin interfaceTableDataServiceConfig
-
getFilter
- Specified by:
getFilterin interfaceTableDataServiceConfig
-
getStorageName
- Specified by:
getStorageNamein interfaceTableDataServiceConfig
-
getStorageRoot
- Specified by:
getStorageRootin interfaceTableDataServiceConfig
-
getDescription
- Specified by:
getDescriptionin interfaceTableDataServiceConfig
-
getTags
- Specified by:
getTagsin interfaceTableDataServiceConfig
-
getDelegates
- Specified by:
getDelegatesin interfaceTableDataServiceConfig
-
getProperties
Description copied from interface:DataRoutingService.PropertyProviderReturn all properties as a map. This is useful for interactions outside the DB project.- Specified by:
getPropertiesin interfaceDataRoutingService.PropertyProvider- Returns:
- a map containing all keys and values for this provider
-
toString
-
isRemote
public boolean isRemote()- Specified by:
isRemotein interfaceTableDataServiceConfig
-