Interface Cache
- All Known Subinterfaces:
LocalCache
- All Known Implementing Classes:
ImageCache, LocalCache.Bind, LocalCache.Volume
Details of a cache for use by the CNB builder.
- Since:
- 2.6.0
- Author:
- Scott Frederick, Tim Ysewyn, Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalCacheCreate a newCachethat uses a bind mount with the provided source.default @Nullable LocalCache.BindgetBind()Return the details of the cache if it is a bind cache.default @Nullable ImageCachegetImage()Return the details of the cache if it is an image cache.default @Nullable LocalCache.VolumeReturn the details of the cache if it is a volume cache.static ImageCacheCreate a newCachethat uses an image with the provided name.static LocalCacheCreate a newCachethat uses a volume with the provided name.static LocalCachevolume(VolumeName name) Create a newCachethat uses a volume with the provided name.
-
Method Details
-
getVolume
Return the details of the cache if it is a volume cache.- Returns:
- the cache, or
nullif it is not a volume cache
-
getBind
Return the details of the cache if it is a bind cache.- Returns:
- the cache, or
nullif it is not a bind cache
-
getImage
Return the details of the cache if it is an image cache.- Returns:
- the cache, or
nullif it is not an image cache - Since:
- 4.2.0
-
volume
Create a newCachethat uses a volume with the provided name.- Parameters:
name- the cache volume name- Returns:
- a new cache instance
-
volume
Create a newCachethat uses a volume with the provided name.- Parameters:
name- the cache volume name- Returns:
- a new cache instance
-
bind
Create a newCachethat uses a bind mount with the provided source.- Parameters:
source- the cache bind mount source- Returns:
- a new cache instance
-
image
Create a newCachethat uses an image with the provided name.- Parameters:
name- the cache image name- Returns:
- a new cache instance
- Since:
- 4.2.0
-