> }
>
> @Override
> - public Iterable<? extends CookbookVersion>
> execute(ListeningExecutorService executor, String environmentName, String
> numVersions) {
> - return execute(executor,
> api.listCookbooksInEnvironment(environmentName, numVersions));
> + public Iterable<? extends CookbookVersion> execute(ExecutorService
> executor,
> + String environmentName, String numVersions) {
> + return
> this.executeConcurrently(MoreExecutors.listeningDecorator(executor),
> environmentName, numVersions);
> + }
> +
> +
> + private Iterable<? extends CookbookVersion>
> executeConcurrently(ListeningExecutorService executor,
> + String environmentName) {
> + return super.execute(
> + transform(api.listCookbooksInEnvironment(environmentName), new
> Function<CookbookDefinition, String>() {
`new Function<CookbookDefinition, String>()` turns up three times...extract
into a local utility function?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/47/files#r15464569