Package org.apache.maven.buildcache
Class LocalCacheRepositoryImpl
- java.lang.Object
-
- org.apache.maven.buildcache.LocalCacheRepositoryImpl
-
- All Implemented Interfaces:
CacheRepository
,LocalCacheRepository
@Named public class LocalCacheRepositoryImpl extends Object implements LocalCacheRepository
Local cache repository implementation.
-
-
Constructor Summary
Constructors Constructor Description LocalCacheRepositoryImpl(RemoteCacheRepository remoteRepository, XmlService xmlService, CacheConfig cacheConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeSave(CacheContext environment)
void
clearCache(CacheContext context)
Optional<Build>
findBestMatchingBuild(org.apache.maven.execution.MavenSession session, org.apache.maven.model.Dependency dependency)
Optional<Build>
findBuild(CacheContext context)
Optional<Build>
findLocalBuild(CacheContext context)
Path
getArtifactFile(CacheContext context, CacheSource source, Artifact artifact)
void
saveArtifactFile(CacheResult cacheResult, org.apache.maven.artifact.Artifact artifact)
void
saveBuildInfo(CacheResult cacheResult, Build build)
void
saveCacheReport(String buildId, org.apache.maven.execution.MavenSession session, CacheReport cacheReport)
-
-
-
Constructor Detail
-
LocalCacheRepositoryImpl
@Inject public LocalCacheRepositoryImpl(RemoteCacheRepository remoteRepository, XmlService xmlService, CacheConfig cacheConfig)
-
-
Method Detail
-
findLocalBuild
@Nonnull public Optional<Build> findLocalBuild(CacheContext context) throws IOException
- Specified by:
findLocalBuild
in interfaceLocalCacheRepository
- Throws:
IOException
-
findBuild
@Nonnull public Optional<Build> findBuild(CacheContext context) throws IOException
- Specified by:
findBuild
in interfaceCacheRepository
- Throws:
IOException
-
clearCache
public void clearCache(CacheContext context)
- Specified by:
clearCache
in interfaceLocalCacheRepository
-
findBestMatchingBuild
@Nonnull public Optional<Build> findBestMatchingBuild(org.apache.maven.execution.MavenSession session, org.apache.maven.model.Dependency dependency)
- Specified by:
findBestMatchingBuild
in interfaceLocalCacheRepository
-
getArtifactFile
public Path getArtifactFile(CacheContext context, CacheSource source, Artifact artifact) throws IOException
- Specified by:
getArtifactFile
in interfaceLocalCacheRepository
- Throws:
IOException
-
beforeSave
public void beforeSave(CacheContext environment)
- Specified by:
beforeSave
in interfaceLocalCacheRepository
-
saveBuildInfo
public void saveBuildInfo(CacheResult cacheResult, Build build) throws IOException
- Specified by:
saveBuildInfo
in interfaceCacheRepository
- Throws:
IOException
-
saveCacheReport
public void saveCacheReport(String buildId, org.apache.maven.execution.MavenSession session, CacheReport cacheReport) throws IOException
- Specified by:
saveCacheReport
in interfaceCacheRepository
- Throws:
IOException
-
saveArtifactFile
public void saveArtifactFile(CacheResult cacheResult, org.apache.maven.artifact.Artifact artifact) throws IOException
- Specified by:
saveArtifactFile
in interfaceCacheRepository
- Throws:
IOException
-
-