org.hibernate.search.backend.impl.lucene
Enum IndexInteractionType

java.lang.Object
  extended by java.lang.Enum<IndexInteractionType>
      extended by org.hibernate.search.backend.impl.lucene.IndexInteractionType
All Implemented Interfaces:
Serializable, Comparable<IndexInteractionType>

public enum IndexInteractionType
extends Enum<IndexInteractionType>

Constants to make the LuceneWorkDelegates advertise the type of resource they are going to need to perform the work. NEEDS_INDEXREADER is missing to make sure there always is an optimal solution, as some operations can be done both through an IndexReader and an IndexWriter, but as of Lucene 2.4 there are no operations which can't be done using an IndexWriter.

Author:
Sanne Grinovero

Enum Constant Summary
NEEDS_INDEXWRITER
          The workType needs an IndexWriter.
PREFER_INDEXREADER
          An IndexReader should work best but it's possible to use an IndexWriter instead.
PREFER_INDEXWRITER
          An IndexWriter should work best but it's possible to use an IndexReader instead.
 
Method Summary
static IndexInteractionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IndexInteractionType[] 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

NEEDS_INDEXWRITER

public static final IndexInteractionType NEEDS_INDEXWRITER
The workType needs an IndexWriter.


PREFER_INDEXWRITER

public static final IndexInteractionType PREFER_INDEXWRITER
An IndexWriter should work best but it's possible to use an IndexReader instead.


PREFER_INDEXREADER

public static final IndexInteractionType PREFER_INDEXREADER
An IndexReader should work best but it's possible to use an IndexWriter instead.

Method Detail

values

public static IndexInteractionType[] 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 (IndexInteractionType c : IndexInteractionType.values())
    System.out.println(c);

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

valueOf

public static IndexInteractionType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null