1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.buildcache;
20
21 import javax.annotation.Nonnull;
22
23 import java.io.IOException;
24 import java.nio.file.Path;
25 import java.util.Optional;
26
27 import org.apache.maven.buildcache.xml.Build;
28 import org.apache.maven.buildcache.xml.CacheSource;
29 import org.apache.maven.buildcache.xml.build.Artifact;
30 import org.apache.maven.execution.MavenSession;
31 import org.apache.maven.model.Dependency;
32
33
34
35
36 public interface LocalCacheRepository extends CacheRepository {
37
38 void beforeSave(CacheContext environment) throws IOException;
39
40 Path getArtifactFile(CacheContext context, CacheSource source, Artifact artifact) throws IOException;
41
42 void clearCache(CacheContext context);
43
44 @Nonnull
45 Optional<Build> findBestMatchingBuild(MavenSession session, Dependency dependency) throws IOException;
46
47 @Nonnull
48 Optional<Build> findLocalBuild(CacheContext context) throws IOException;
49 }