andreaturli commented on this pull request.


> +import com.google.common.base.Function;
+import com.google.common.cache.LoadingCache;
+
+@Singleton
+public class TemplateToAvailabilitySet implements Function<Template, 
AvailabilitySet> {
+
+   @Resource
+   @Named(ComputeServiceConstants.COMPUTE_LOGGER)
+   protected Logger logger = Logger.NULL;
+
+   private final AzureComputeApi api;
+   private final LoadingCache<String, ResourceGroup> resourceGroupMap;
+
+   @Inject
+   TemplateToAvailabilitySet(AzureComputeApi api, LoadingCache<String, 
ResourceGroup> resourceGroupMap) {
+      this.api = api;

I've seen in other jclouds providers some problems in re-using those kind of 
functions that can become harmful as you may not realize that you are calling 
listSecurityGroups API for every single firewall rule, but it is obviously not 
a problem of the function interface per se, but of its usage.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/356

Reply via email to