Neo4j Enterprise

org.neo4j.kernel
Class ProxyIndexManager

java.lang.Object
  extended by org.neo4j.kernel.ProxyIndexManager
All Implemented Interfaces:
IndexManager

public class ProxyIndexManager
extends Object
implements IndexManager


Field Summary
 
Fields inherited from interface org.neo4j.graphdb.index.IndexManager
PROVIDER
 
Constructor Summary
ProxyIndexManager()
           
 
Method Summary
 boolean existsForNodes(String indexName)
          Returns whether or not there exists a node index with the name indexName.
 boolean existsForRelationships(String indexName)
          Returns whether or not there exists a relationship index with the name indexName.
 Index<Node> forNodes(String indexName)
          Returns an Index for Nodes with the name indexName.
 Index<Node> forNodes(String indexName, Map<String,String> customConfiguration)
          Returns an Index for Nodes with the name indexName.
 RelationshipIndex forRelationships(String indexName)
          Returns an Index for Relationships with the name indexName.
 RelationshipIndex forRelationships(String indexName, Map<String,String> customConfiguration)
          Returns an Index for Relationships with the name indexName.
 Map<String,String> getConfiguration(Index<? extends PropertyContainer> index)
          Returns the configuration for index.
 AutoIndexer<Node> getNodeAutoIndexer()
           
 RelationshipAutoIndexer getRelationshipAutoIndexer()
           
 String[] nodeIndexNames()
          Returns the names of all existing Node indexes.
 String[] relationshipIndexNames()
          Returns the names of all existing Relationship indexes.
 String removeConfiguration(Index<? extends PropertyContainer> index, String key)
          EXPERT: Removes a configuration parameter from an index.
 String setConfiguration(Index<? extends PropertyContainer> index, String key, String value)
          EXPERT: Sets a configuration parameter for an index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyIndexManager

public ProxyIndexManager()
Method Detail

existsForNodes

public boolean existsForNodes(String indexName)
Description copied from interface: IndexManager
Returns whether or not there exists a node index with the name indexName. Indexes are created when needed in calls to IndexManager.forNodes(String) and IndexManager.forNodes(String, Map).

Specified by:
existsForNodes in interface IndexManager
Parameters:
indexName - the name of the index to check.
Returns:
whether or not there exists a node index with the name indexName.

forNodes

public Index<Node> forNodes(String indexName)
Description copied from interface: IndexManager
Returns an Index for Nodes with the name indexName. If such an index doesn't exist it will be created with default configuration. Indexes created with IndexManager.forNodes(String, Map) can be returned by this method also, so that you don't have to supply and match its configuration for consecutive accesses. This is the prefered way of accessing indexes, whether they were created with IndexManager.forNodes(String) or IndexManager.forNodes(String, Map).

Specified by:
forNodes in interface IndexManager
Parameters:
indexName - the name of the node index.
Returns:
the Index corresponding to the indexName.

forNodes

public Index<Node> forNodes(String indexName,
                            Map<String,String> customConfiguration)
Description copied from interface: IndexManager
Returns an Index for Nodes with the name indexName. If the index exists it will be returned if the provider and customConfiguration matches, else an IllegalArgumentException will be thrown. If the index doesn't exist it will be created with the given provider (given in the configuration map).

Specified by:
forNodes in interface IndexManager
Parameters:
indexName - the name of the index to create.
customConfiguration - configuration for the index being created. Use the provider key to control which index implementation, i.e. the IndexImplementation to use for this index if it's created. The value represents the service name corresponding to the IndexImplementation. Other options can f.ex. say that the index will be a fulltext index and that it should be case insensitive. The parameters given here (except "provider") are only interpreted by the implementation represented by the provider.

nodeIndexNames

public String[] nodeIndexNames()
Description copied from interface: IndexManager
Returns the names of all existing Node indexes. Those names can then be used to get to the actual Index instances.

Specified by:
nodeIndexNames in interface IndexManager
Returns:
the names of all existing Node indexes.

existsForRelationships

public boolean existsForRelationships(String indexName)
Description copied from interface: IndexManager
Returns whether or not there exists a relationship index with the name indexName. Indexes are created when needed in calls to IndexManager.forRelationships(String) and IndexManager.forRelationships(String, Map).

Specified by:
existsForRelationships in interface IndexManager
Parameters:
indexName - the name of the index to check.
Returns:
whether or not there exists a relationship index with the name indexName.

forRelationships

public RelationshipIndex forRelationships(String indexName)
Description copied from interface: IndexManager
Returns an Index for Relationships with the name indexName. If such an index doesn't exist it will be created with default configuration. Indexes created with IndexManager.forRelationships(String, Map) can be returned by this method also, so that you don't have to supply and match its configuration for consecutive accesses. This is the prefered way of accessing indexes, whether they were created with IndexManager.forRelationships(String) or IndexManager.forRelationships(String, Map).

Specified by:
forRelationships in interface IndexManager
Parameters:
indexName - the name of the node index.
Returns:
the Index corresponding to the indexName.

forRelationships

public RelationshipIndex forRelationships(String indexName,
                                          Map<String,String> customConfiguration)
Description copied from interface: IndexManager
Returns an Index for Relationships with the name indexName. If the index exists it will be returned if the provider and customConfiguration matches, else an IllegalArgumentException will be thrown. If the index doesn't exist it will be created with the given provider (given in the configuration map).

Specified by:
forRelationships in interface IndexManager
Parameters:
indexName - the name of the index to create.
customConfiguration - configuration for the index being created. Use the provider key to control which index implementation, i.e. the IndexImplementation to use for this index if it's created. The value represents the service name corresponding to the IndexImplementation. Other options can f.ex. say that the index will be a fulltext index and that it should be case insensitive. The parameters given here (except "provider") are only interpreted by the implementation represented by the provider.

relationshipIndexNames

public String[] relationshipIndexNames()
Description copied from interface: IndexManager
Returns the names of all existing Relationship indexes. Those names can then be used to get to the actual Index instances.

Specified by:
relationshipIndexNames in interface IndexManager
Returns:
the names of all existing Relationship indexes.

getConfiguration

public Map<String,String> getConfiguration(Index<? extends PropertyContainer> index)
Description copied from interface: IndexManager
Returns the configuration for index. Configuration can be set when creating an index, with f.ex IndexManager.forNodes(String, Map) or with IndexManager.setConfiguration(Index, String, String) or IndexManager.removeConfiguration(Index, String).

Specified by:
getConfiguration in interface IndexManager
Returns:
configuration for the index.

setConfiguration

public String setConfiguration(Index<? extends PropertyContainer> index,
                               String key,
                               String value)
Description copied from interface: IndexManager
EXPERT: Sets a configuration parameter for an index. If a configuration parameter with the given key it will be overwritten. WARNING: Overwriting parameters which controls the storage format of index data may lead to existing index data being unusable. The key "provider" is a reserved parameter and cannot be overwritten, if key is "provider" then an IllegalArgumentException will be thrown.

Specified by:
setConfiguration in interface IndexManager
Parameters:
index - the index to set a configuration parameter for.
key - the configuration parameter key.
value - the new value of the configuration parameter.
Returns:
the overwritten value if any.

removeConfiguration

public String removeConfiguration(Index<? extends PropertyContainer> index,
                                  String key)
Description copied from interface: IndexManager
EXPERT: Removes a configuration parameter from an index. If there's no value for the given key nothing will happen and null will be returned. WARNING: Removing parameters which controls the storage format of index data may lead to existing index data being unusable. The key "provider" is a reserved parameter and cannot be removed, if key is "provider" then an IllegalArgumentException will be thrown.

Specified by:
removeConfiguration in interface IndexManager
Parameters:
index - the index to remove a configuration parameter from.
key - the configuration parameter key.
Returns:
the removed value if any.

getNodeAutoIndexer

public AutoIndexer<Node> getNodeAutoIndexer()
Specified by:
getNodeAutoIndexer in interface IndexManager

getRelationshipAutoIndexer

public RelationshipAutoIndexer getRelationshipAutoIndexer()
Specified by:
getRelationshipAutoIndexer in interface IndexManager

Neo4j Enterprise

Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.