Schema.IndexState| Constructor and Description |
|---|
SchemaImpl(ThreadToStatementContextBridge ctxProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitIndexesOnline(long duration,
TimeUnit unit)
Wait until all indices comes online
|
void |
awaitIndexOnline(IndexDefinition index,
long duration,
TimeUnit unit)
Wait until an index comes online
|
ConstraintCreator |
constraintFor(Label label)
Returns a
ConstraintCreator where details about the constraint can be
specified. |
Iterable<ConstraintDefinition> |
getConstraints() |
Iterable<ConstraintDefinition> |
getConstraints(Label label) |
Iterable<IndexDefinition> |
getIndexes() |
Iterable<IndexDefinition> |
getIndexes(Label label) |
String |
getIndexFailure(IndexDefinition index)
If
Schema.getIndexState(IndexDefinition) return Schema.IndexState.FAILED this method will
return the failure description. |
Schema.IndexState |
getIndexState(IndexDefinition index)
Poll the database for the state of a given index.
|
IndexCreator |
indexFor(Label label)
Returns an
IndexCreator where details about the index to create can be
specified. |
public SchemaImpl(ThreadToStatementContextBridge ctxProvider)
public IndexCreator indexFor(Label label)
SchemaIndexCreator 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.indexFor in interface Schemalabel - label on nodes to be indexedIndexCreator capable of providing details for, as well as creating
an index for the given label.public Iterable<IndexDefinition> getIndexes(Label label)
public Iterable<IndexDefinition> getIndexes()
getIndexes in interface Schemaindexes in this database.public void awaitIndexOnline(IndexDefinition index, long duration, TimeUnit unit)
SchemaawaitIndexOnline in interface Schemaindex - the index that we want to wait forduration - duration to wait for the index to come onlineunit - TimeUnit of durationpublic void awaitIndexesOnline(long duration,
TimeUnit unit)
SchemaawaitIndexesOnline in interface Schemaduration - duration to wait for all indexes to come onlineunit - TimeUnit of durationpublic Schema.IndexState getIndexState(IndexDefinition index)
SchemagetIndexState in interface Schemaindex - the index that we want to poll state forSchema.IndexState of the indexpublic String getIndexFailure(IndexDefinition index)
SchemaSchema.getIndexState(IndexDefinition) return Schema.IndexState.FAILED this method will
return the failure description.getIndexFailure in interface Schemaindex - the IndexDescriptor to get failure from.public ConstraintCreator constraintFor(Label label)
SchemaConstraintCreator where details about the constraint can be
specified. When all details have been entered ConstraintCreator.create()
must be called for it to actually be created.
Creating a constraint will have the transaction creating it block on commit until
all existing data has been verified for compliance. If any existing data doesn't
comply with the constraint the transaction will not be able to commit, but
fail in Transaction.finish().constraintFor in interface Schemalabel - the label this constraint is for.ConstraintCreator capable of providing details for, as well as creating
a constraint for the given label.public Iterable<ConstraintDefinition> getConstraints()
getConstraints in interface Schemapublic Iterable<ConstraintDefinition> getConstraints(Label label)
getConstraints in interface Schemalabel - the label to get constraints for.Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.