public void download(final Artifact artifact, final BuildableArtifactResolveResult result) { cacheLockingManager.longRunningOperation( String.format("Download %s using repository %s", artifact, getId()), new Runnable() { public void run() { repository.download(artifact, result); } }); }
public ModuleVersionDescriptor getDependency(final DependencyDescriptor dd) throws ModuleVersionResolveException { return cacheLockingManager.longRunningOperation( String.format("Resolve %s using repository %s", dd, getId()), new Factory<ModuleVersionDescriptor>() { public ModuleVersionDescriptor create() { return repository.getDependency(dd); } }); }