public interface GlobalCacheManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
currentRepositoryIsUpToDate()
Check if the repository in current session has been updated recently.
|
void |
endSession()
Terminates current session (in the same thread).
|
void |
ensureGlobalCacheExistAndWritable()
Ensures global cache exists and is writable.
|
java.io.File |
getGlobalCacheRepoDir()
Get the go repository in global cache in current session
|
java.io.File |
getGlobalGoBinCacheDir(java.lang.String relativePath)
Get the path which locates in
relativePath relative to ~/.gradle/go/binary |
java.util.Optional<GlobalCacheMetadata> |
getMetadata(java.nio.file.Path packagePath)
Get the metadata of a package specified by
packagePath |
void |
repoUpdated()
Notifies that the repository in current session has been updated.
|
void |
startSession(VcsGolangPackage pkg)
Starts a session with given package.
|
void ensureGlobalCacheExistAndWritable()
void startSession(VcsGolangPackage pkg)
pkg - e.g. golang.org/x/toolsvoid endSession()
void repoUpdated()
boolean currentRepositoryIsUpToDate()
true if the package is up-to-date, false otherwise.GolangPluginSetting.getGlobalCacheSecond()java.io.File getGlobalCacheRepoDir()
java.io.File getGlobalGoBinCacheDir(java.lang.String relativePath)
relativePath relative to ~/.gradle/go/binaryrelativePath - the relative path to ~/.gradle/go/binaryjava.util.Optional<GlobalCacheMetadata> getMetadata(java.nio.file.Path packagePath)
packagePathpackagePath - import path of the packageOptional.empty() otherwise.