Class TableDataServiceData
java.lang.Object
com.illumon.iris.db.v2.routing.impl.yaml.TableDataServiceData
- All Implemented Interfaces:
DataRoutingService.PropertyProvider,ServiceRegistryConfig,TableDataServiceConfig
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 TypeMethodDescriptionReturn all properties as a map.Collection<? extends TableDataServiceConfig>getName()default StringgetProperty(String propertyName) Return the named property value, or null.default <T> TgetProperty(String propertyName, T defaultValue) Return the named property value, with the type indicated by the default value.Returns the value populated for 'serviceregistry' tag under endpoints sub-config.getTags()booleanisRemote()static TableDataServiceDatamakeComposingData(String name, String description, List<String> tags, Filter filter, List<TableDataServiceData> sources, Map<String, String> properties) static TableDataServiceDatamakeDelegateData(String sourceName, String description, Filter filter, List<TableDataServiceData> delegates) static TableDataServiceDatamakeDelegateGroupData(String sourceName, String description, Filter filter, List<TableDataServiceData> delegates) static TableDataServiceDatamakeLTDSData(String name, String description, List<String> tags, Filter filter, com.illumon.iris.db.v2.routing.impl.yaml.StorageData storage, Map<String, String> properties, DataRoutingService.EndpointConfig endpointConfig) static TableDataServiceDatamakeRemoteData(String name, String description, List<String> tags, Filter filter, List<TableDataServiceData> sources, Map<String, String> properties, DataRoutingService.EndpointConfig endpointConfig) toString()
-
Field Details
-
FAILOVER_GROUP_PROP
this property on a TableDataServiceData indicates that the delegates are a failover group- See Also:
-
-
Method Details
-
makeRemoteData
public static TableDataServiceData makeRemoteData(@NotNull String name, @Nullable String description, @NotNull List<String> tags, @NotNull Filter filter, @Nullable List<TableDataServiceData> sources, @NotNull Map<String, String> properties, @NotNull DataRoutingService.EndpointConfig endpointConfig) -
makeComposingData
-
makeLTDSData
public static TableDataServiceData makeLTDSData(@NotNull String name, @Nullable String description, @NotNull List<String> tags, @NotNull Filter filter, @NotNull com.illumon.iris.db.v2.routing.impl.yaml.StorageData storage, @NotNull Map<String, String> properties, @NotNull DataRoutingService.EndpointConfig endpointConfig) -
makeDelegateData
public static TableDataServiceData makeDelegateData(@NotNull String sourceName, @Nullable String description, @NotNull Filter filter, @NotNull List<TableDataServiceData> delegates) -
makeDelegateGroupData
public static TableDataServiceData makeDelegateGroupData(@NotNull String sourceName, @Nullable String description, @NotNull Filter filter, @NotNull List<TableDataServiceData> delegates) -
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
-
getStorageRoot
- Specified by:
getStorageRootin interfaceTableDataServiceConfig
-
getDescription
- Specified by:
getDescriptionin interfaceTableDataServiceConfig
-
getTags
- Specified by:
getTagsin interfaceTableDataServiceConfig
-
getDelegates
- Specified by:
getDelegatesin interfaceTableDataServiceConfig
-
getAllProperties
Description copied from interface:DataRoutingService.PropertyProviderReturn all properties as a map. This is useful for interactions outside the DB project.- Specified by:
getAllPropertiesin interfaceDataRoutingService.PropertyProvider- Returns:
- a map containing all keys and values for this provider
-
toString
-
isRemote
public boolean isRemote()- Specified by:
isRemotein interfaceTableDataServiceConfig
-
getProperty
Description copied from interface:DataRoutingService.PropertyProviderReturn the named property value, or null.- Specified by:
getPropertyin interfaceDataRoutingService.PropertyProvider- Parameters:
propertyName- the name of the property to fetch- Returns:
- the value of the property, or null if not set
-
getProperty
Description copied from interface:DataRoutingService.PropertyProviderReturn the named property value, with the type indicated by the default value. If the property isn't set, return the default value.- Specified by:
getPropertyin interfaceDataRoutingService.PropertyProvider- Type Parameters:
T- The return value will be cast to this type, as defined by the default value- Parameters:
propertyName- the name of the property to fetchdefaultValue- the typed default value to return if the property is not set- Returns:
- the value of the property, or null if not set
-