Class CmsFlexCacheConfiguration

    • Method Detail

      • getAvgCacheBytes

        public long getAvgCacheBytes()
        Returns the average cache bytes.

        Returns:
        the average cache bytes
      • 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 flexcache
        offline - enable the flexcache for the offline project
        maxCacheBytes - the max bytes for cache
        avgCacheBytes - the average bytes for cache
        maxEntryBytes - the max bytes for entry
        maxKeys - 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