| org.apache.ivy.core.cache.RepositoryCacheManager
All known Subclasses: org.apache.ivy.core.cache.DefaultRepositoryCacheManager,
RepositoryCacheManager | public interface RepositoryCacheManager (Code) | | |
Method Summary | |
public ResolvedModuleRevision | cacheModuleDescriptor(DependencyResolver resolver, ResolvedResource orginalMetadataRef, DependencyDescriptor dd, Artifact requestedMetadataArtifact, ResourceDownloader downloader, CacheMetadataOptions options) Caches an original module descriptor. | public void | clean() Cleans the whole cache. | abstract public ArtifactDownloadReport | download(Artifact artifact, ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader, CacheDownloadOptions options) Downloads an artifact to this cache. | abstract public ResolvedModuleRevision | findModuleInCache(DependencyDescriptor dd, CacheMetadataOptions options, String expectedResolver) | abstract public String | getName() Returns the name of the repository cache manager. | abstract public ArtifactOrigin | getSavedArtifactOrigin(Artifact artifact) Returns the artifact origin of the given artifact as saved in this cache, or
ArtifactOrigin.UNKNOWN if the origin is unknown.
Parameters: artifact - the artifact for which the saved artifact origin should be returned. | public void | originalToCachedModuleDescriptor(DependencyResolver resolver, ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact, ResolvedModuleRevision rmr, ModuleDescriptorWriter writer) Stores a standardized version of an original module descriptor in the cache for later use. | abstract public void | saveResolvers(ModuleDescriptor descriptor, String metadataResolverName, String artifactResolverName) Saves the information of which resolvers were used to resolve a module (both for metadata and
artifact), so that this info can be loaded later (even after a jvm restart) for the use of
RepositoryCacheManager.findModuleInCache(DependencyDescriptor,CacheMetadataOptions,String) . |
cacheModuleDescriptor | public ResolvedModuleRevision cacheModuleDescriptor(DependencyResolver resolver, ResolvedResource orginalMetadataRef, DependencyDescriptor dd, Artifact requestedMetadataArtifact, ResourceDownloader downloader, CacheMetadataOptions options) throws ParseException(Code) | | Caches an original module descriptor.
After this call, the original module descriptor file (with no modification nor conversion)
should be available as a local file.
Parameters: resolver - the dependency resolver from which the cache request comes from Parameters: orginalMetadataRef - a resolved resource pointing to the remote original module descriptor Parameters: dd - the dependency descriptor for which the module descriptor should be cached Parameters: requestedMetadataArtifact - the module descriptor artifact as requested originally Parameters: downloader - a ResourceDownloader able to download the original module descriptor resource ifrequired by this cache implementation Parameters: options - options to apply to cache this module descriptor a ResolvedModuleRevision representing the local cached module descriptor, ornull if it failed throws: ParseException - if an exception occured while parsing the module descriptor |
clean | public void clean()(Code) | | Cleans the whole cache.
|
download | abstract public ArtifactDownloadReport download(Artifact artifact, ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader, CacheDownloadOptions options)(Code) | | Downloads an artifact to this cache.
Parameters: artifact - the artifact to download Parameters: resourceResolver - a resource resolver to use if the artifact needs to be resolved to a Resource fordownloading Parameters: resourceDownloader - a resource downloader to use if actual download of the resource is needed Parameters: options - a set of options to adjust the download a report indicating how the download was performed |
findModuleInCache | abstract public ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd, CacheMetadataOptions options, String expectedResolver)(Code) | | Search a module descriptor in cache for a mrid
Parameters: dd - the dependency descriptor identifying the module to search Parameters: options - options on how caching should be handled Parameters: expectedResolver - the resolver with which the md in cache must have been resolved to be returned,null if this doesn't matter the ResolvedModuleRevision corresponding to the module found, null if none correcthas been found in cache |
getName | abstract public String getName()(Code) | | Returns the name of the repository cache manager.
the name of the repository cache manager. |
getSavedArtifactOrigin | abstract public ArtifactOrigin getSavedArtifactOrigin(Artifact artifact)(Code) | | Returns the artifact origin of the given artifact as saved in this cache, or
ArtifactOrigin.UNKNOWN if the origin is unknown.
Parameters: artifact - the artifact for which the saved artifact origin should be returned. the artifact origin of the given artifact as saved in this cache |
originalToCachedModuleDescriptor | public void originalToCachedModuleDescriptor(DependencyResolver resolver, ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact, ResolvedModuleRevision rmr, ModuleDescriptorWriter writer)(Code) | | Stores a standardized version of an original module descriptor in the cache for later use.
Parameters: resolver - the dependency resolver from which the cache request comes from Parameters: orginalMetadataRef - a resolved resource pointing to the remote original module descriptor Parameters: requestedMetadataArtifact - the module descriptor artifact as requested originally Parameters: rmr - the ResolvedModuleRevision representing the local cached module descriptor Parameters: writer - a ModuleDescriptorWriter able to write the module descriptor to a stream. |
|
|