org.neo4j.kernel
Class SchemaImpl

java.lang.Object
  extended by org.neo4j.kernel.SchemaImpl
All Implemented Interfaces:
Schema

public class SchemaImpl
extends Object
implements Schema


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.neo4j.graphdb.schema.Schema
Schema.IndexState
 
Constructor Summary
SchemaImpl(ThreadToStatementContextBridge ctxProvider, org.neo4j.kernel.impl.cleanup.CleanupService cleanupService, org.neo4j.kernel.impl.core.KeyHolder<org.neo4j.kernel.impl.core.PropertyIndex> propertyKeyManager)
           
 
Method Summary
 void awaitIndexOnline(IndexDefinition index, long duration, TimeUnit unit)
          Wait until an index comes online
 ResourceIterable<IndexDefinition> getIndexes()
           
 ResourceIterable<IndexDefinition> getIndexes(Label label)
           
 Schema.IndexState getIndexState(IndexDefinition index)
          Poll the database for the state of a given index.
 IndexCreator indexCreator(Label label)
          Returns an IndexCreator where details about the index to create can be specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaImpl

public SchemaImpl(ThreadToStatementContextBridge ctxProvider,
                  org.neo4j.kernel.impl.cleanup.CleanupService cleanupService,
                  org.neo4j.kernel.impl.core.KeyHolder<org.neo4j.kernel.impl.core.PropertyIndex> propertyKeyManager)
Method Detail

indexCreator

public IndexCreator indexCreator(Label label)
Description copied from interface: Schema
Returns an IndexCreator where details about the index to create can be specified. When all details have been entered create must be called for it to actually be created. Creating an index enables indexing for nodes with the specified label. The index will have the details supplied to the returned index creator. All existing and all future nodes matching the index definition will be indexed, speeding up future operations.

Specified by:
indexCreator in interface Schema
Parameters:
label - label on nodes to be indexed
Returns:
an IndexCreator capable of providing details for, as well as creating an index for the given label.

getIndexes

public ResourceIterable<IndexDefinition> getIndexes(Label label)
Specified by:
getIndexes in interface Schema
Parameters:
label - the Label to get indexes for.
Returns:
all indexes attached to the given label.

getIndexes

public ResourceIterable<IndexDefinition> getIndexes()
Specified by:
getIndexes in interface Schema
Returns:
all indexes in this database.

awaitIndexOnline

public void awaitIndexOnline(IndexDefinition index,
                             long duration,
                             TimeUnit unit)
Description copied from interface: Schema
Wait until an index comes online

Specified by:
awaitIndexOnline in interface Schema
Parameters:
index - the index that we want to wait for
duration - duration to wait for the index to come online
unit - TimeUnit of duration

getIndexState

public Schema.IndexState getIndexState(IndexDefinition index)
Description copied from interface: Schema
Poll the database for the state of a given index. This can be used to track when, during creation of a new index, an index is done populating itself and comes online to serve requests.

Specified by:
getIndexState in interface Schema
Parameters:
index - the index that we want to poll state for
Returns:
the current Schema.IndexState of the index


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