Package org.opencms.flex
Class CmsFlexCacheConfiguration
java.lang.Object
org.opencms.flex.CmsFlexCacheConfiguration
Flex Cache configuration class.
- Since:
- 6.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the average cache bytes.Returns the deviceSelector.Returns the device selector configuration.long
Returns the maxCacheBytes.int
Returns the maxEntryBytes.int
Returns the maxKeys.void
initialize
(String enabled, String offline, String maxCacheBytes, String avgCacheBytes, String maxEntryBytes, String maxKeys) Initializes the flex cache configuration with required parameters.boolean
Checks if flexcache is enabled or not.boolean
Checks the cacheOffline.void
setAvgCacheBytes
(long avgCacheBytes) Sets the avgCacheBytes.void
setCacheEnabled
(boolean enabled) Sets the enabled.void
setCacheOffline
(boolean cacheOffline) Sets the cacheOffline.void
setDeviceSelectorConfiguration
(String deviceSelector) Sets the device selector configuration.void
setMaxCacheBytes
(long maxCacheBytes) Sets the maxCacheBytes.void
setMaxEntryBytes
(int maxEntryBytes) Sets the maxEntryBytes.void
setMaxKeys
(int maxKeys) Sets the maxKeys.
-
Constructor Details
-
CmsFlexCacheConfiguration
public CmsFlexCacheConfiguration()Empty public constructor for the digester.
-
-
Method Details
-
getAvgCacheBytes
Returns the average cache bytes.- Returns:
- the average cache bytes
-
getDeviceSelector
Returns the deviceSelector.- Returns:
- the deviceSelector
-
getDeviceSelectorConfiguration
Returns the device selector configuration.- Returns:
- the device selector configuration
-
getMaxCacheBytes
Returns the maxCacheBytes.- Returns:
- the maxCacheBytes
-
getMaxEntryBytes
Returns the maxEntryBytes.- Returns:
- the maxEntryBytes
-
getMaxKeys
Returns the maxKeys.- Returns:
- the maxKeys
-
initialize
public void initialize(String enabled, String offline, String maxCacheBytes, String avgCacheBytes, String maxEntryBytes, String maxKeys) Initializes the flex cache configuration with required parameters.- Parameters:
enabled
- enables or disable the flexcacheoffline
- enable the flexcache for the offline projectmaxCacheBytes
- the max bytes for cacheavgCacheBytes
- the average bytes for cachemaxEntryBytes
- the max bytes for entrymaxKeys
- the max keys
-
isCacheEnabled
Checks if flexcache is enabled or not.- Returns:
- true if flexcache is enabled; otherwise false
-
isCacheOffline
Checks the cacheOffline.- Returns:
- true if cacheoffline is set to true; otherwise false
-
setAvgCacheBytes
Sets the avgCacheBytes.- Parameters:
avgCacheBytes
- the avgCacheBytes to set
-
setCacheEnabled
Sets the enabled.- Parameters:
enabled
- the enabled to set
-
setCacheOffline
Sets the cacheOffline.- Parameters:
cacheOffline
- the cacheOffline to set
-
setDeviceSelectorConfiguration
Sets the device selector configuration.- Parameters:
deviceSelector
- the device selector to set
-
setMaxCacheBytes
Sets the maxCacheBytes.- Parameters:
maxCacheBytes
- the maxCacheBytes to set
-
setMaxEntryBytes
Sets the maxEntryBytes.- Parameters:
maxEntryBytes
- the maxEntryBytes to set
-
setMaxKeys
Sets the maxKeys.- Parameters:
maxKeys
- the maxKeys to set
-