/** * Get the IDs of the cached parameter maps for a layer. * * <p>Stores that predate 1.12 should implement this to provide any parameters for which maps * are not available. Stores not using {@link ParametersUtils#getId(Map)} or which have more * efficient ways to provide it should also implement it. * * @param layerName * @return */ public default Set<String> getParameterIds(String layerName) throws StorageException { return getParametersMapping(layerName).keySet(); }
public Map<String, Optional<Map<String, String>>> getParametersMapping(String layerName) { componentsStateLock.lock(); try { if (LOG.isDebugEnabled()) { LOG.debug("Getting parameters for Layer: " + layerName); } return store.getParametersMapping(layerName); } finally { componentsStateLock.unlock(); } } }
/** * Get the cached parameter maps for a layer * * @param layerName * @return */ public default Set<Map<String, String>> getParameters(String layerName) throws StorageException { return getParametersMapping(layerName) .values() .stream() .filter(Optional::isPresent) .map(Optional::get) .collect(Collectors.toSet()); }
public Map<String, Optional<Map<String, String>>> getParametersMapping(String layerName) { return readFunction(() -> store(layerName).getParametersMapping(layerName)); }
}; return getParametersMapping(layer.getName()) .entrySet() .stream()