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 String
this 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 String
getProperty
(String propertyName) Return the named property value, or null.default <T> T
getProperty
(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()
boolean
isRemote()
static TableDataServiceData
makeComposingData
(String name, String description, List<String> tags, Filter filter, List<TableDataServiceData> sources, Map<String, String> properties) static TableDataServiceData
makeDelegateData
(String sourceName, String description, Filter filter, List<TableDataServiceData> delegates) static TableDataServiceData
makeDelegateGroupData
(String sourceName, String description, Filter filter, List<TableDataServiceData> delegates) static TableDataServiceData
makeLTDSData
(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 TableDataServiceData
makeRemoteData
(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: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
-
getStorageRoot
- Specified by:
getStorageRoot
in interfaceTableDataServiceConfig
-
getDescription
- Specified by:
getDescription
in interfaceTableDataServiceConfig
-
getTags
- Specified by:
getTags
in interfaceTableDataServiceConfig
-
getDelegates
- Specified by:
getDelegates
in interfaceTableDataServiceConfig
-
getAllProperties
Description copied from interface:DataRoutingService.PropertyProvider
Return all properties as a map. This is useful for interactions outside the DB project.- Specified by:
getAllProperties
in interfaceDataRoutingService.PropertyProvider
- Returns:
- a map containing all keys and values for this provider
-
toString
-
isRemote
public boolean isRemote()- Specified by:
isRemote
in interfaceTableDataServiceConfig
-
getProperty
Description copied from interface:DataRoutingService.PropertyProvider
Return the named property value, or null.- Specified by:
getProperty
in 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.PropertyProvider
Return the named property value, with the type indicated by the default value. If the property isn't set, return the default value.- Specified by:
getProperty
in 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
-