org.hibernate.search.annotations
Enum FilterCacheModeType

java.lang.Object
  extended by java.lang.Enum<FilterCacheModeType>
      extended by org.hibernate.search.annotations.FilterCacheModeType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FilterCacheModeType>

public enum FilterCacheModeType
extends java.lang.Enum<FilterCacheModeType>

Cache mode strategy for FullTextFilterDefs.

Author:
Emmanuel Bernard
See Also:
FullTextFilterDef

Enum Constant Summary
INSTANCE_AND_DOCIDSETRESULTS
          Both the filter instance and the DocIdSet results are cached.
INSTANCE_ONLY
          The filter instance is cached by Hibernate Search and reused across concurrent Filter.getDocIdSet() calls.
NONE
          No filter instance and no result is cached by Hibernate Search.
 
Method Summary
static FilterCacheModeType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FilterCacheModeType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final FilterCacheModeType NONE
No filter instance and no result is cached by Hibernate Search. For every filter call, a new filter instance is created.


INSTANCE_ONLY

public static final FilterCacheModeType INSTANCE_ONLY
The filter instance is cached by Hibernate Search and reused across concurrent Filter.getDocIdSet() calls. Results are not cached by Hibernate Search.

See Also:
Filter.bits(org.apache.lucene.index.IndexReader)

INSTANCE_AND_DOCIDSETRESULTS

public static final FilterCacheModeType INSTANCE_AND_DOCIDSETRESULTS
Both the filter instance and the DocIdSet results are cached. The filter instance is cached by Hibernate Search and reused across concurrent Filter.getDocIdSet() calls. DocIdSet results are cached per IndexReader.

See Also:
Filter.bits(org.apache.lucene.index.IndexReader)
Method Detail

values

public static FilterCacheModeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FilterCacheModeType c : FilterCacheModeType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FilterCacheModeType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright © 2006-2010 Hibernate. All Rights Reserved.