|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryCacheManager
Method Summary | |
---|---|
ResolvedModuleRevision |
cacheModuleDescriptor(DependencyResolver resolver,
ResolvedResource orginalMetadataRef,
DependencyDescriptor dd,
Artifact requestedMetadataArtifact,
ResourceDownloader downloader,
CacheMetadataOptions options)
Caches an original module descriptor. |
void |
clean()
Cleans the whole cache. |
ArtifactDownloadReport |
download(Artifact artifact,
ArtifactResourceResolver resourceResolver,
ResourceDownloader resourceDownloader,
CacheDownloadOptions options)
Downloads an artifact to this cache. |
ResolvedModuleRevision |
findModuleInCache(DependencyDescriptor dd,
ModuleRevisionId requestedRevisionId,
CacheMetadataOptions options,
java.lang.String expectedResolver)
Search a module descriptor in cache for a mrid |
java.lang.String |
getName()
Returns the name of the repository cache manager. |
ArtifactOrigin |
getSavedArtifactOrigin(Artifact artifact)
Returns the artifact origin of the given artifact as saved in this cache. |
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. |
void |
saveResolvers(ModuleDescriptor descriptor,
java.lang.String metadataResolverName,
java.lang.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 #findModuleInCache(DependencyDescriptor, CacheMetadataOptions, String) . |
Method Detail |
---|
java.lang.String getName()
void saveResolvers(ModuleDescriptor descriptor, java.lang.String metadataResolverName, java.lang.String artifactResolverName)
#findModuleInCache(DependencyDescriptor, CacheMetadataOptions, String)
.
md
- the module descriptor resolvedmetadataResolverName
- metadata resolver nameartifactResolverName
- artifact resolver nameArtifactOrigin getSavedArtifactOrigin(Artifact artifact)
If the origin is unknown, the returned ArtifactOrigin instance will return true when
ArtifactOrigin.isUnknown(ArtifactOrigin)
is called.
artifact
- the artifact for which the saved artifact origin should be returned.
ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd, ModuleRevisionId requestedRevisionId, CacheMetadataOptions options, java.lang.String expectedResolver)
dd
- the dependency descriptor identifying the module to searchrequestedRevisionId
- the requested dependency module revision id identifying the module to searchoptions
- options on how caching should be handledexpectedResolver
- the resolver with which the md in cache must have been resolved to be returned,
null if this doesn't matter
ArtifactDownloadReport download(Artifact artifact, ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader, CacheDownloadOptions options)
artifact
- the artifact to downloadresourceResolver
- a resource resolver to use if the artifact needs to be resolved to a Resource for
downloadingresourceDownloader
- a resource downloader to use if actual download of the resource is neededoptions
- a set of options to adjust the download
ResolvedModuleRevision cacheModuleDescriptor(DependencyResolver resolver, ResolvedResource orginalMetadataRef, DependencyDescriptor dd, Artifact requestedMetadataArtifact, ResourceDownloader downloader, CacheMetadataOptions options) throws java.text.ParseException
After this call, the original module descriptor file (with no modification nor conversion) should be available as a local file.
resolver
- the dependency resolver from which the cache request comes fromorginalMetadataRef
- a resolved resource pointing to the remote original module descriptordd
- the dependency descriptor for which the module descriptor should be cachedrequestedMetadataArtifact
- the module descriptor artifact as requested originallydownloader
- a ResourceDownloader able to download the original module descriptor resource if
required by this cache implementationoptions
- options to apply to cache this module descriptor
ResolvedModuleRevision
representing the local cached module descriptor, or
null if it failed
java.text.ParseException
- if an exception occured while parsing the module descriptorvoid originalToCachedModuleDescriptor(DependencyResolver resolver, ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact, ResolvedModuleRevision rmr, ModuleDescriptorWriter writer)
resolver
- the dependency resolver from which the cache request comes fromorginalMetadataRef
- a resolved resource pointing to the remote original module descriptorrequestedMetadataArtifact
- the module descriptor artifact as requested originallyrmr
- the ResolvedModuleRevision
representing the local cached module descriptorwriter
- a ModuleDescriptorWriter
able to write the module descriptor to a stream.void clean()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |