Class Cache
java.lang.Object
org.springframework.boot.buildpack.platform.build.Cache
- Direct Known Subclasses:
Cache.Bind,Cache.Volume
Details of a cache for use by the CNB builder.
- Since:
- 2.6.0
- Author:
- Scott Frederick
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDetails of a cache stored in a bind mount.static enumThe format of the cache.static classDetails of a cache stored in a Docker volume. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CacheCreate a newCachethat uses a bind mount with the provided source.booleangetBind()Return the details of the cache if it is a bind cache.Return the details of the cache if it is a volume cache.inthashCode()static CacheCreate a newCachethat uses a volume with the provided name.static Cachevolume(VolumeName name) Create a newCachethat uses a volume with the provided name.
-
Field Details
-
format
-
-
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
-
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
-
equals
-
hashCode
public int hashCode()
-