Class Searchable


  • public class Searchable
    extends java.lang.Object
    Search configuration for a Cache
    Author:
    teck
    • Field Detail

      • KEYS_DEFAULT

        public static final boolean KEYS_DEFAULT
        Default for auto-searchable keys
        See Also:
        Constant Field Values
      • VALUES_DEFAULT

        public static final boolean VALUES_DEFAULT
        Default for auto-searchable values
        See Also:
        Constant Field Values
      • DYNAMIC_INDEXING_DEFAULT

        public static final boolean DYNAMIC_INDEXING_DEFAULT
        Default for allowing dynamic indexing
        See Also:
        Constant Field Values
    • Constructor Detail

      • Searchable

        public Searchable()
        Constructor
    • Method Detail

      • getSearchAttributes

        public java.util.Map<java.lang.String,​SearchAttribute> getSearchAttributes()
        Get the defined search attributes indexed by attribute name
        Returns:
        search attributes
      • searchAttribute

        public Searchable searchAttribute​(SearchAttribute searchAttribute)
        Add a search attribute
        Parameters:
        searchAttribute - attribute to add
        Returns:
        this
      • freezeConfiguration

        public void freezeConfiguration()
        Freeze this configuration. Any subsequent changes will throw a CacheException
      • getUserDefinedSearchAttributes

        public java.util.Map<java.lang.String,​SearchAttribute> getUserDefinedSearchAttributes()
        Get the defined search attributes indexed by attribute name *excluding* any search attributes that are automatically/implicitly defined (eg. key and value attributes)
        Returns:
        search attributes
      • keys

        public boolean keys()
        Are keys searchable?
        Returns:
        true if keys are searchable
      • values

        public boolean values()
        Are values searchable?
        Returns:
        true if values are searchable
      • isDynamicIndexingAllowed

        public boolean isDynamicIndexingAllowed()
        Is dynamic indexing allowed?
        Returns:
      • values

        public void values​(boolean b)
        Toggle searchable values
        Parameters:
        b -
      • keys

        public void keys​(boolean b)
        Toggle searchable keys
        Parameters:
        b -
      • setKeys

        public void setKeys​(boolean keys)
        Toggle searchable keys
        Parameters:
        keys -
      • setValues

        public void setValues​(boolean values)
        Toggle searchable values
        Parameters:
        values -
      • setAllowDynamicIndexing

        public void setAllowDynamicIndexing​(boolean allow)
        Allow or disallow dynamic search attribute extraction
        Parameters:
        allow -
      • allowDynamicIndexing

        public void allowDynamicIndexing​(boolean allow)
        Allow or disallow dynamic search attribute extraction
        Parameters:
        allow -