Class ReadThroughCacheConfiguration

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class ReadThroughCacheConfiguration
    extends java.lang.Object
    implements java.lang.Cloneable
    This classed is used to programmatically configure a ReadThroughCache.
    Author:
    cschanck
    • Field Detail

      • NAME_KEY

        public static final java.lang.String NAME_KEY
        Properties key for the name attribute
        See Also:
        Constant Field Values
      • GET_KEY

        public static final java.lang.String GET_KEY
        Properties key for the get() proxy attribute
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReadThroughCacheConfiguration

        public ReadThroughCacheConfiguration()
        Create default, valid configuration.
    • Method Detail

      • fromProperties

        public ReadThroughCacheConfiguration fromProperties​(java.util.Properties properties)
        Create a configuration object from a properties object. Validate before returning.
        Parameters:
        properties -
        Returns:
      • toProperties

        public java.util.Properties toProperties()
        Return a properties version of this configuration object.
        Returns:
      • modeGet

        public ReadThroughCacheConfiguration modeGet​(boolean modeGet)
        Set whether get() methods will be transparently proxied.
        Parameters:
        modeGet - true to proxy get methods
        Returns:
      • isModeGet

        public boolean isModeGet()
        Return whether the get() method is proxied.
        Returns:
        true if proxied
      • setModeGet

        public void setModeGet​(boolean modeGet)
        Set whether get() methods will be transparently proxied.
        Parameters:
        modeGet - true t pxoy the get() methods
      • getName

        public java.lang.String getName()
        Get the name to set for this cache decorator. May be null.
        Returns:
        the name
      • setName

        public ReadThroughCacheConfiguration setName​(java.lang.String name)
        Set the name to set for this cache decorator. May be null.
        Parameters:
        name - name to use, may be null
        Returns:
        this config
      • name

        public ReadThroughCacheConfiguration name​(java.lang.String name)
        Set the name to set for this cache decorator. May be null.
        Parameters:
        name - name to use, may be null
        Returns:
        this config
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object