org.neo4j.kernel.api.operations
Interface SchemaOperations

All Known Subinterfaces:
StatementContext

public interface SchemaOperations


Method Summary
 org.neo4j.kernel.impl.nioneo.store.IndexRule addIndexRule(long labelId, long propertyKey)
          Adds a IndexRule to the database which applies globally on both existing as well as new data.
 void dropIndexRule(org.neo4j.kernel.impl.nioneo.store.IndexRule indexRule)
          Drops a IndexRule from the database
 org.neo4j.kernel.impl.api.index.IndexDescriptor getIndexDescriptor(long indexId)
          Returns the index descriptor for the given indexId.
 org.neo4j.kernel.impl.nioneo.store.IndexRule getIndexRule(long labelId, long propertyKey)
          Returns the index rule for the given labelId and propertyKey.
 Iterator<org.neo4j.kernel.impl.nioneo.store.IndexRule> getIndexRules()
          Returns all index rules.
 Iterator<org.neo4j.kernel.impl.nioneo.store.IndexRule> getIndexRules(long labelId)
          Get all indexes for a label.
 InternalIndexState getIndexState(org.neo4j.kernel.impl.nioneo.store.IndexRule indexRule)
          Retrieve the state of an index.
<K,V> V
getOrCreateFromSchemaState(K key, Function<K,V> creator)
          The schema state is flushed when ever the schema is updated.
<K> boolean
schemaStateContains(K key)
          Check if some key is in the schema state.
 

Method Detail

addIndexRule

org.neo4j.kernel.impl.nioneo.store.IndexRule addIndexRule(long labelId,
                                                          long propertyKey)
                                                          throws ConstraintViolationKernelException
Adds a IndexRule to the database which applies globally on both existing as well as new data.

Throws:
ConstraintViolationKernelException

getIndexRule

org.neo4j.kernel.impl.nioneo.store.IndexRule getIndexRule(long labelId,
                                                          long propertyKey)
                                                          throws SchemaRuleNotFoundException
Returns the index rule for the given labelId and propertyKey.

Throws:
SchemaRuleNotFoundException

getIndexDescriptor

org.neo4j.kernel.impl.api.index.IndexDescriptor getIndexDescriptor(long indexId)
                                                                   throws IndexNotFoundKernelException
Returns the index descriptor for the given indexId.

Throws:
IndexNotFoundKernelException

getIndexRules

Iterator<org.neo4j.kernel.impl.nioneo.store.IndexRule> getIndexRules(long labelId)
Get all indexes for a label.


getIndexRules

Iterator<org.neo4j.kernel.impl.nioneo.store.IndexRule> getIndexRules()
Returns all index rules.


getIndexState

InternalIndexState getIndexState(org.neo4j.kernel.impl.nioneo.store.IndexRule indexRule)
                                 throws IndexNotFoundKernelException
Retrieve the state of an index.

Throws:
IndexNotFoundKernelException

dropIndexRule

void dropIndexRule(org.neo4j.kernel.impl.nioneo.store.IndexRule indexRule)
                   throws ConstraintViolationKernelException
Drops a IndexRule from the database

Throws:
ConstraintViolationKernelException

getOrCreateFromSchemaState

<K,V> V getOrCreateFromSchemaState(K key,
                                   Function<K,V> creator)
The schema state is flushed when ever the schema is updated. If you build objects the rely on the current state of the schema, use this to make sure you don't use outdated schema information. Additionally, schema state entries are evicted using an LRU policy. The size of the LRU cache is determined by GraphDatabaseSettings.query_cache_size NOTE: This currently is solely used by Cypher and might or might not be turned into a more generic facility in teh future


schemaStateContains

<K> boolean schemaStateContains(K key)
Check if some key is in the schema state.



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