|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ivy.core.cache.CacheManager
public class CacheManager
Constructor Summary | |
---|---|
CacheManager(CacheSettings settings,
java.io.File cache)
|
Method Summary | |
---|---|
ResolvedModuleRevision |
cacheModuleDescriptor(DependencyResolver resolver,
ResolvedResource mdRef,
Artifact moduleArtifact,
ResourceDownloader downloader,
CacheMetadataOptions options)
|
ArtifactDownloadReport |
download(Artifact artifact,
ArtifactResourceResolver resourceResolver,
ResourceDownloader resourceDownloader,
CacheDownloadOptions options)
Downloads an artifact to this cache. |
ResolvedModuleRevision |
findModuleInCache(ModuleRevisionId mrid,
boolean validate,
java.lang.String expectedResolver)
Search a module descriptor in cache for a mrid |
java.io.File |
getArchiveFileInCache(Artifact artifact)
Returns a File object pointing to where the artifact can be found on the local file system. |
java.io.File |
getArchiveFileInCache(Artifact artifact,
ArtifactOrigin origin)
Returns a File object pointing to where the artifact can be found on the local file system. |
java.io.File |
getArchiveFileInCache(Artifact artifact,
ArtifactOrigin origin,
boolean useOrigin)
Returns a File object pointing to where the artifact can be found on the local file system, using or not the original location depending on the availability of origin information provided as parameter and the setting of useOrigin. |
java.lang.String |
getArchivePathInCache(Artifact artifact)
|
java.lang.String |
getArchivePathInCache(Artifact artifact,
ArtifactOrigin origin)
|
java.io.File |
getConfigurationResolveReportInCache(java.lang.String resolveId,
java.lang.String conf)
|
java.io.File[] |
getConfigurationResolveReportsInCache(java.lang.String resolveId)
|
static CacheManager |
getInstance(CacheSettings settings)
|
static CacheManager |
getInstance(CacheSettings settings,
java.io.File cache)
|
java.io.File |
getIvyFileInCache(ModuleRevisionId mrid)
|
LockStrategy |
getLockStrategy()
|
Artifact |
getOriginalMetadataArtifact(Artifact moduleArtifact)
|
java.io.File |
getRepositoryCacheRoot()
|
java.io.File |
getResolutionCacheRoot()
|
java.io.File |
getResolvedIvyFileInCache(ModuleRevisionId mrid)
|
java.io.File |
getResolvedIvyPropertiesInCache(ModuleRevisionId mrid)
|
ArtifactOrigin |
getSavedArtifactOrigin(Artifact artifact)
|
void |
originalToCachedModuleDescriptor(DependencyResolver resolver,
ResolvedResource orginalMetadataRef,
Artifact requestedMetadataArtifact,
ModuleDescriptor md,
ModuleDescriptorWriter writer)
|
void |
saveResolvers(ModuleDescriptor md,
java.lang.String metadataResolverName,
java.lang.String artifactResolverName)
Saves the information of which resolver was used to resolve a md, so that this info can be retrieve later (even after a jvm restart) by getSavedArtResolverName(ModuleDescriptor md) |
void |
setLockStrategy(LockStrategy lockStrategy)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CacheManager(CacheSettings settings, java.io.File cache)
Method Detail |
---|
public static CacheManager getInstance(CacheSettings settings, java.io.File cache)
public static CacheManager getInstance(CacheSettings settings)
public java.io.File getResolvedIvyFileInCache(ModuleRevisionId mrid)
getResolvedIvyFileInCache
in interface ResolutionCacheManager
public java.io.File getResolvedIvyPropertiesInCache(ModuleRevisionId mrid)
getResolvedIvyPropertiesInCache
in interface ResolutionCacheManager
public java.io.File getConfigurationResolveReportInCache(java.lang.String resolveId, java.lang.String conf)
getConfigurationResolveReportInCache
in interface ResolutionCacheManager
public java.io.File[] getConfigurationResolveReportsInCache(java.lang.String resolveId)
getConfigurationResolveReportsInCache
in interface ResolutionCacheManager
public java.io.File getIvyFileInCache(ModuleRevisionId mrid)
getIvyFileInCache
in interface RepositoryCacheManager
public java.io.File getArchiveFileInCache(Artifact artifact)
getArchiveFileInCache
in interface RepositoryCacheManager
public java.io.File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin)
getArchiveFileInCache
in interface RepositoryCacheManager
public java.io.File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin, boolean useOrigin)
getArchiveFileInCache
in interface RepositoryCacheManager
public java.lang.String getArchivePathInCache(Artifact artifact)
getArchivePathInCache
in interface RepositoryCacheManager
public java.lang.String getArchivePathInCache(Artifact artifact, ArtifactOrigin origin)
getArchivePathInCache
in interface RepositoryCacheManager
public void saveResolvers(ModuleDescriptor md, java.lang.String metadataResolverName, java.lang.String artifactResolverName)
saveResolvers
in interface RepositoryCacheManager
md
- the module descriptor resolvedname
- artifact resolver namepublic ArtifactOrigin getSavedArtifactOrigin(Artifact artifact)
getSavedArtifactOrigin
in interface RepositoryCacheManager
public ResolvedModuleRevision findModuleInCache(ModuleRevisionId mrid, boolean validate, java.lang.String expectedResolver)
RepositoryCacheManager
findModuleInCache
in interface RepositoryCacheManager
mrid
- the id of the module to searchvalidate
- true to validate ivy file found in cache before returningexpectedResolver
- the resolver with which the md in cache must have been resolved to be returned,
null if this doesn't matter
public java.lang.String toString()
toString
in class java.lang.Object
public java.io.File getRepositoryCacheRoot()
getRepositoryCacheRoot
in interface RepositoryCacheManager
public java.io.File getResolutionCacheRoot()
getResolutionCacheRoot
in interface ResolutionCacheManager
public LockStrategy getLockStrategy()
public void setLockStrategy(LockStrategy lockStrategy)
public ArtifactDownloadReport download(Artifact artifact, ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader, CacheDownloadOptions options)
RepositoryCacheManager
download
in interface RepositoryCacheManager
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
public void originalToCachedModuleDescriptor(DependencyResolver resolver, ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact, ModuleDescriptor md, ModuleDescriptorWriter writer)
originalToCachedModuleDescriptor
in interface RepositoryCacheManager
public ResolvedModuleRevision cacheModuleDescriptor(DependencyResolver resolver, ResolvedResource mdRef, Artifact moduleArtifact, ResourceDownloader downloader, CacheMetadataOptions options) throws java.text.ParseException
cacheModuleDescriptor
in interface RepositoryCacheManager
java.text.ParseException
public Artifact getOriginalMetadataArtifact(Artifact moduleArtifact)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |