org.apache.jackrabbit.oak.performance
Class IndexManager

java.lang.Object
  extended by org.apache.jackrabbit.oak.performance.IndexManager

public class IndexManager
extends Object

A utility class to manage indexes in Oak.


Field Summary
static String INDEX_CONFIG_PATH
          The root node of the index definition (configuration) nodes.
 
Constructor Summary
IndexManager()
           
 
Method Summary
static boolean createPropertyIndex(javax.jcr.Session session, String propertyName)
          Creates a property index for the given property if such an index doesn't exist yet, and if the repository supports property indexes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX_CONFIG_PATH

public static final String INDEX_CONFIG_PATH
The root node of the index definition (configuration) nodes.

See Also:
Constant Field Values
Constructor Detail

IndexManager

public IndexManager()
Method Detail

createPropertyIndex

public static boolean createPropertyIndex(javax.jcr.Session session,
                                          String propertyName)
                                   throws javax.jcr.RepositoryException
Creates a property index for the given property if such an index doesn't exist yet, and if the repository supports property indexes. The session may not have pending changes.

Parameters:
session - the session
propertyName - the property name
Returns:
true if the index was created or already existed
Throws:
javax.jcr.RepositoryException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.