/** * {@inheritDoc}. * * <p> * If the result is already in cache, return the result. * Otherwise, delegate the functionality to the fallback object. * * If the fallback did not support this operation, will build the entire topology of the {@link org.apache.gobblin.config.store.api.ConfigStore} * using default breath first search. * </p> */ @Override public Collection<ConfigKeyPath> getImportedBy(ConfigKeyPath configKey) { return getImportedBy(configKey, Optional.<Config>absent()); }
result = inMemory.getImportedBy(nertzTag2); Assert.assertTrue(result.size()==1); Assert.assertEquals(result.iterator().next(), espressoTag);
public Collection<ConfigKeyPath> getImportedByRecursively(ConfigKeyPath configKey, Optional<Config> runtimeConfig) { return new ImportTraverser<>(key -> Lists.newLinkedList(getImportedBy(key, runtimeConfig)), this.recursiveImportedByMap).traverseGraphRecursively(configKey); } }
public Collection<ConfigKeyPath> getImportedBy(ConfigKeyPath configKey, Optional<Config> runtimeConfig) { if (this.fullImportedByMap != null) { return this.fullImportedByMap.get(configKey); } try { return this.ownImportedByMap.get(configKey, () -> this.fallback.getImportedBy(configKey, runtimeConfig)); } catch (UncheckedExecutionException exc) { if (exc.getCause() instanceof UnsupportedOperationException) { computeImportedByMap(runtimeConfig); return getImportedBy(configKey, runtimeConfig); } else { throw new RuntimeException(exc); } } catch (ExecutionException ee) { throw new RuntimeException(ee); } }
/** * {@inheritDoc}. * * <p> * If the result is already in cache, return the result. * Otherwise, delegate the functionality to the fallback object. * * If the fallback did not support this operation, will build the entire topology of the {@link org.apache.gobblin.config.store.api.ConfigStore} * using default breath first search. * </p> */ @Override public Collection<ConfigKeyPath> getImportedBy(ConfigKeyPath configKey) { return getImportedBy(configKey, Optional.<Config>absent()); }
public Collection<ConfigKeyPath> getImportedByRecursively(ConfigKeyPath configKey, Optional<Config> runtimeConfig) { return new ImportTraverser<>(key -> Lists.newLinkedList(getImportedBy(key, runtimeConfig)), this.recursiveImportedByMap).traverseGraphRecursively(configKey); } }
public Collection<ConfigKeyPath> getImportedBy(ConfigKeyPath configKey, Optional<Config> runtimeConfig) { if (this.fullImportedByMap != null) { return this.fullImportedByMap.get(configKey); } try { return this.ownImportedByMap.get(configKey, () -> this.fallback.getImportedBy(configKey, runtimeConfig)); } catch (UncheckedExecutionException exc) { if (exc.getCause() instanceof UnsupportedOperationException) { computeImportedByMap(runtimeConfig); return getImportedBy(configKey, runtimeConfig); } else { throw new RuntimeException(exc); } } catch (ExecutionException ee) { throw new RuntimeException(ee); } }