use of org.commonjava.indy.measure.annotation.IndyMetrics in project indy by Commonjava.
the class KojiContentManagerDecorator method retrieve.
@Override
@IndyMetrics(measure = @Measure(timers = @MetricNamed(name = IndyMetricsKojiNames.METHOD_CONTENTMANAGER_RETRIEVE + IndyMetricsNames.TIMER), meters = @MetricNamed(name = IndyMetricsKojiNames.METHOD_CONTENTMANAGER_RETRIEVE + IndyMetricsNames.METER)))
public Transfer retrieve(final ArtifactStore store, final String path, final EventMetadata eventMetadata) throws IndyWorkflowException {
Logger logger = LoggerFactory.getLogger(getClass());
logger.info("KOJI: Delegating initial retrieval attempt for: {}/{}", store.getKey(), path);
Transfer result = delegate.retrieve(store, path, eventMetadata);
if (result == null && StoreType.group == store.getKey().getType()) {
logger.info("KOJI: Checking for Koji build matching: {}", path);
Group group = (Group) store;
RemoteRepository kojiProxy = findKojiBuildAnd(store, path, eventMetadata, null, this::createRemoteRepository);
if (kojiProxy != null) {
adjustTargetGroup(kojiProxy, group);
result = delegate.retrieve(kojiProxy, path, eventMetadata);
}
if (result != null) {
nfc.clearMissing(new ConcreteResource(LocationUtils.toLocation(store), path));
}
}
// Finally, pass the Transfer back.
return result;
}
Aggregations