ehcache

net.sf.ehcache.config
Class Searchable

java.lang.Object
  extended by net.sf.ehcache.config.Searchable

public class Searchable
extends Object

Search configuration for a Cache

Author:
teck

Field Summary
static boolean DYNAMIC_INDEXING_DEFAULT
          Default for allowing dynamic indexing
static boolean KEYS_DEFAULT
          Default for auto-searchable keys
static boolean VALUES_DEFAULT
          Default for auto-searchable values
 
Constructor Summary
Searchable()
          Constructor
 
Method Summary
 void addSearchAttribute(SearchAttribute searchAttribute)
          Add the given search attribute
 void allowDynamicIndexing(boolean allow)
          Allow or disallow dynamic search attribute extraction
 void freezeConfiguration()
          Freeze this configuration.
 Map<String,SearchAttribute> getSearchAttributes()
          Get the defined search attributes indexed by attribute name
 Map<String,SearchAttribute> getUserDefinedSearchAttributes()
          Get the defined search attributes indexed by attribute name *excluding* any search attributes that are automatically/implicitly defined (eg.
 boolean isDynamicIndexingAllowed()
          Is dynamic indexing allowed?
 boolean keys()
          Are keys searchable?
 void keys(boolean b)
          Toggle searchable keys
 Searchable searchAttribute(SearchAttribute searchAttribute)
          Add a search attribute
 void setAllowDynamicIndexing(boolean allow)
          Allow or disallow dynamic search attribute extraction
 void setKeys(boolean keys)
          Toggle searchable keys
 void setValues(boolean values)
          Toggle searchable values
 boolean values()
          Are values searchable?
 void values(boolean b)
          Toggle searchable values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

addSearchAttribute

public void addSearchAttribute(SearchAttribute searchAttribute)
                        throws InvalidConfigurationException
Add the given search attribute

Parameters:
searchAttribute - to add
Throws:
InvalidConfigurationException - if an attribute already exists for the same name

getSearchAttributes

public Map<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 Map<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 -

ehcache

Copyright 2001-2014, Terracotta, Inc.