@Override public Set<String> getContainedNamespaces(ConfigNamespace umbrella, String... umbrellaElements) { ImmutableSet.Builder<String> b = ImmutableSet.builder(); b.addAll(first.getContainedNamespaces(umbrella, umbrellaElements)); b.addAll(second.getContainedNamespaces(umbrella, umbrellaElements)); return b.build(); } @Override
@Override public Set<String> getContainedNamespaces(ConfigNamespace umbrella, String... umbrellaElements) { return config.getContainedNamespaces(umbrella,concat(umbrellaElements)); }
private static Map<String, IndexProvider> getIndexes(Configuration config) { ImmutableMap.Builder<String, IndexProvider> builder = ImmutableMap.builder(); for (String index : config.getContainedNamespaces(INDEX_NS)) { Preconditions.checkArgument(StringUtils.isNotBlank(index), "Invalid index name [%s]", index); log.info("Configuring index [{}]", index); IndexProvider provider = getImplementationClass(config.restrictTo(index), config.get(INDEX_BACKEND,index), StandardIndexProvider.getAllProviderClasses()); Preconditions.checkNotNull(provider); builder.put(index, provider); } return builder.build(); }
public static List<RegisteredAttributeClass<?>> getRegisteredAttributeClasses(Configuration configuration) { List<RegisteredAttributeClass<?>> all = new ArrayList<>(); for (String attributeId : configuration.getContainedNamespaces(CUSTOM_ATTRIBUTE_NS)) { Preconditions.checkArgument(attributeId.startsWith(ATTRIBUTE_PREFIX),"Invalid attribute definition: %s",attributeId); int position;
storeNames.addAll(config.getContainedNamespaces(Constants.DYNAMODB_STORES_NAMESPACE)); storeNames.forEach(storeName -> setupStore(config, readRateLimit, writeRateLimit, storeName));