Package org.opencms.flex
Class CmsFlexCacheConfiguration
- java.lang.Object
-
- org.opencms.flex.CmsFlexCacheConfiguration
-
public class CmsFlexCacheConfiguration extends java.lang.Object
Flex Cache configuration class.- Since:
- 6.0.0
-
-
Constructor Summary
Constructors Constructor Description CmsFlexCacheConfiguration()
Empty public constructor for the digester.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAvgCacheBytes()
Returns the average cache bytes.I_CmsJspDeviceSelector
getDeviceSelector()
Returns the deviceSelector.java.lang.String
getDeviceSelectorConfiguration()
Returns the device selector configuration.long
getMaxCacheBytes()
Returns the maxCacheBytes.int
getMaxEntryBytes()
Returns the maxEntryBytes.int
getMaxKeys()
Returns the maxKeys.void
initialize(java.lang.String enabled, java.lang.String offline, java.lang.String maxCacheBytes, java.lang.String avgCacheBytes, java.lang.String maxEntryBytes, java.lang.String maxKeys)
Initializes the flex cache configuration with required parameters.boolean
isCacheEnabled()
Checks if flexcache is enabled or not.boolean
isCacheOffline()
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(java.lang.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 Detail
-
CmsFlexCacheConfiguration
public CmsFlexCacheConfiguration()
Empty public constructor for the digester.
-
-
Method Detail
-
getAvgCacheBytes
public long getAvgCacheBytes()
Returns the average cache bytes.- Returns:
- the average cache bytes
-
getDeviceSelector
public I_CmsJspDeviceSelector getDeviceSelector()
Returns the deviceSelector.- Returns:
- the deviceSelector
-
getDeviceSelectorConfiguration
public java.lang.String getDeviceSelectorConfiguration()
Returns the device selector configuration.- Returns:
- the device selector configuration
-
getMaxCacheBytes
public long getMaxCacheBytes()
Returns the maxCacheBytes.- Returns:
- the maxCacheBytes
-
getMaxEntryBytes
public int getMaxEntryBytes()
Returns the maxEntryBytes.- Returns:
- the maxEntryBytes
-
getMaxKeys
public int getMaxKeys()
Returns the maxKeys.- Returns:
- the maxKeys
-
initialize
public void initialize(java.lang.String enabled, java.lang.String offline, java.lang.String maxCacheBytes, java.lang.String avgCacheBytes, java.lang.String maxEntryBytes, java.lang.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
public boolean isCacheEnabled()
Checks if flexcache is enabled or not.- Returns:
- true if flexcache is enabled; otherwise false
-
isCacheOffline
public boolean isCacheOffline()
Checks the cacheOffline.- Returns:
- true if cacheoffline is set to true; otherwise false
-
setAvgCacheBytes
public void setAvgCacheBytes(long avgCacheBytes)
Sets the avgCacheBytes.- Parameters:
avgCacheBytes
- the avgCacheBytes to set
-
setCacheEnabled
public void setCacheEnabled(boolean enabled)
Sets the enabled.- Parameters:
enabled
- the enabled to set
-
setCacheOffline
public void setCacheOffline(boolean cacheOffline)
Sets the cacheOffline.- Parameters:
cacheOffline
- the cacheOffline to set
-
setDeviceSelectorConfiguration
public void setDeviceSelectorConfiguration(java.lang.String deviceSelector)
Sets the device selector configuration.- Parameters:
deviceSelector
- the device selector to set
-
setMaxCacheBytes
public void setMaxCacheBytes(long maxCacheBytes)
Sets the maxCacheBytes.- Parameters:
maxCacheBytes
- the maxCacheBytes to set
-
setMaxEntryBytes
public void setMaxEntryBytes(int maxEntryBytes)
Sets the maxEntryBytes.- Parameters:
maxEntryBytes
- the maxEntryBytes to set
-
setMaxKeys
public void setMaxKeys(int maxKeys)
Sets the maxKeys.- Parameters:
maxKeys
- the maxKeys to set
-
-