Package org.gradle.caching
Klasse MapBasedBuildCacheService
java.lang.Object
org.gradle.caching.MapBasedBuildCacheService
- Alle implementierten Schnittstellen:
Closeable,AutoCloseable,BuildCacheService
Simple build cache implementation that delegates to a
ConcurrentMap.- Seit:
- 3.5
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidclose()Clean up any resources held by the cache once it's not used anymore.booleanload(BuildCacheKey key, BuildCacheEntryReader reader) Load the cached entry corresponding to the given cache key.voidstore(BuildCacheKey key, BuildCacheEntryWriter output) Store the cache entry with the given cache key.
-
Konstruktordetails
-
MapBasedBuildCacheService
-
-
Methodendetails
-
load
Beschreibung aus Schnittstelle kopiert:BuildCacheServiceLoad the cached entry corresponding to the given cache key. Thereaderwill be called if an entry is found in the cache.- Angegeben von:
loadin SchnittstelleBuildCacheService- Parameter:
key- the cache key.reader- the reader to read the data corresponding to the cache key.- Gibt zurück:
trueif an entry was found,falseotherwise.- Löst aus:
BuildCacheException- if the cache fails to load a cache entry for the given key
-
store
Beschreibung aus Schnittstelle kopiert:BuildCacheServiceStore the cache entry with the given cache key. Thewriterwill be called to actually write the data.- Angegeben von:
storein SchnittstelleBuildCacheService- Parameter:
key- the cache key.output- the writer to write the data corresponding to the cache key.- Löst aus:
BuildCacheException- if the cache fails to store a cache entry for the given key
-
close
Beschreibung aus Schnittstelle kopiert:BuildCacheServiceClean up any resources held by the cache once it's not used anymore.- Angegeben von:
closein SchnittstelleAutoCloseable- Angegeben von:
closein SchnittstelleBuildCacheService- Angegeben von:
closein SchnittstelleCloseable- Löst aus:
IOException- if the cache fails to close cleanly.
-