Package org.apache.hc.client5.http.cache
Class RequestCacheControl.Builder
- java.lang.Object
-
- org.apache.hc.client5.http.cache.RequestCacheControl.Builder
-
- Enclosing class:
- RequestCacheControl
public static class RequestCacheControl.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private longmaxAgeprivate longmaxStaleprivate longminFreshprivate booleannoCacheprivate booleannoStoreprivate booleanonlyIfCachedprivate longstaleIfError
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestCacheControlbuild()longgetMaxAge()longgetMaxStale()longgetMinFresh()longgetStaleIfError()booleanisNoCache()booleanisNoStore()booleanisOnlyIfCached()RequestCacheControl.BuildersetMaxAge(long maxAge)RequestCacheControl.BuildersetMaxStale(long maxStale)RequestCacheControl.BuildersetMinFresh(long minFresh)RequestCacheControl.BuildersetNoCache(boolean noCache)RequestCacheControl.BuildersetNoStore(boolean noStore)RequestCacheControl.BuildersetOnlyIfCached(boolean onlyIfCached)RequestCacheControl.BuildersetStaleIfError(long staleIfError)
-
-
-
Method Detail
-
getMaxAge
public long getMaxAge()
-
setMaxAge
public RequestCacheControl.Builder setMaxAge(long maxAge)
-
getMaxStale
public long getMaxStale()
-
setMaxStale
public RequestCacheControl.Builder setMaxStale(long maxStale)
-
getMinFresh
public long getMinFresh()
-
setMinFresh
public RequestCacheControl.Builder setMinFresh(long minFresh)
-
isNoCache
public boolean isNoCache()
-
setNoCache
public RequestCacheControl.Builder setNoCache(boolean noCache)
-
isNoStore
public boolean isNoStore()
-
setNoStore
public RequestCacheControl.Builder setNoStore(boolean noStore)
-
isOnlyIfCached
public boolean isOnlyIfCached()
-
setOnlyIfCached
public RequestCacheControl.Builder setOnlyIfCached(boolean onlyIfCached)
-
getStaleIfError
public long getStaleIfError()
-
setStaleIfError
public RequestCacheControl.Builder setStaleIfError(long staleIfError)
-
build
public RequestCacheControl build()
-
-