Class CacheParams
java.lang.Object
com.sap.cds.services.utils.lib.mtx.impl.CacheParams
Value class that stores cache parameters for
MetaDataAccessorImpl-
Constructor Summary
ConstructorsConstructorDescriptionCacheParams(long maximumSize, Duration expirationDuration, Duration refreshDuration, boolean synchronousRefresh) CacheParams(long maximumSize, Duration expirationDuration, Duration refreshDuration, boolean synchronousRefresh, boolean withBaseModelETag) -
Method Summary
Modifier and TypeMethodDescriptionlonglonglongbooleanboolean
-
Constructor Details
-
CacheParams
public CacheParams(long maximumSize, Duration expirationDuration, Duration refreshDuration, boolean synchronousRefresh) - Parameters:
maximumSize- maximum size of cache for csn and edmx modelexpirationDuration- expiration duration unit after which model is deleted from cache after creation or last refreshrefreshDuration- refresh duration unit after which model is reread from sidecarsynchronousRefresh- cache is refreshed synchronously
-
CacheParams
public CacheParams(long maximumSize, Duration expirationDuration, Duration refreshDuration, boolean synchronousRefresh, boolean withBaseModelETag) - Parameters:
maximumSize- maximum size of cache for csn and edmx modelexpirationDuration- expiration duration unit after which model is deleted from cache after creation or last refreshrefreshDuration- refresh duration unit after which model is reread from sidecarsynchronousRefresh- cache is refreshed synchronouslywithBaseModelETag- determines whether the initial requests are tagged with base model etag
-
-
Method Details
-
getMaximumSize
public long getMaximumSize()- Returns:
- maximum cache size
-
getExpirationDuration
public long getExpirationDuration()- Returns:
- time after which cache entry expires
-
getExpirationDurationUnit
- Returns:
- time unit for time after which cache entry expires
-
getRefreshDuration
public long getRefreshDuration()- Returns:
- time after which model is reread
-
getRefreshDurationUnit
- Returns:
- time unit for time after which model is reread
-
isSynchronousRefresh
public boolean isSynchronousRefresh() -
isWithBaseModelETag
public boolean isWithBaseModelETag()
-