https://issues.apache.org/jira/browse/JCLOUDS-588

Images were cached in memory using a memoized supplier. To allow growing this 
cache with the discovered images, the `ImageCacheSupplier` class has been 
created. It provides an in-memory cache with all discovered images and acts as 
a view over the image cache that also provides access to them.

The in-memory cache for the discovered images expires with the session, just as 
the image cache does.

The default memoized image supplier has been changed to the 
`ImageCacheSupplier`, to make sure all providers get injected the right 
instance, and the old supplier has been qualified with the 'imageCache' 
name, in case a provider needs the basic image cache.
You can merge this Pull Request by running:

  git pull https://github.com/nacx/jclouds 588-imagecache

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/401

-- Commit Summary --

  * JCLOUDS-588: Register discovered images in the image cache

-- File Changes --

    M 
apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/compute/CloudSigmaTemplateBuilderImpl.java
 (4)
    M 
apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImpl.java
 (3)
    M 
apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java (3)
    M 
apis/ec2/src/test/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImplTest.java
 (11)
    M 
apis/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/VCloudTemplateBuilderImpl.java
 (4)
    M 
compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java
 (6)
    M 
compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java
 (40)
    M 
compute/src/main/java/org/jclouds/compute/strategy/impl/AdaptingComputeServiceStrategies.java
 (9)
    A 
compute/src/main/java/org/jclouds/compute/suppliers/ImageCacheSupplier.java (84)
    M 
compute/src/test/java/org/jclouds/compute/domain/internal/TemplateBuilderImplTest.java
 (80)
    A 
compute/src/test/java/org/jclouds/compute/suppliers/ImageCacheSupplierTest.java 
(77)
    M 
providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderImpl.java
 (3)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/401.patch
https://github.com/jclouds/jclouds/pull/401.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/401

Reply via email to