public class WritableDatabaseSchemaIndex extends WritableAbstractDatabaseIndex<org.neo4j.kernel.api.impl.schema.LuceneSchemaIndex> implements SchemaIndex
Constructor and Description |
---|
WritableDatabaseSchemaIndex(PartitionedIndexStorage storage,
org.neo4j.kernel.api.schema.index.IndexDescriptor descriptor,
org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig samplingConfig,
WritableIndexPartitionFactory writableIndexPartitionFactory) |
Modifier and Type | Method and Description |
---|---|
org.neo4j.kernel.api.schema.index.IndexDescriptor |
getDescriptor() |
AbstractIndexPartition |
getFirstPartition(List<AbstractIndexPartition> partitions) |
org.neo4j.storageengine.api.schema.IndexReader |
getIndexReader() |
LuceneIndexWriter |
getIndexWriter() |
boolean |
hasSinglePartition(List<AbstractIndexPartition> partitions) |
boolean |
isOnline()
Check if this index is marked as online.
|
void |
markAsFailed(String failure)
Writes the given failure message to the failure storage.
|
void |
markAsOnline()
Marks index as online by including "status" -> "online" map into commit metadata of the first partition.
|
void |
verifyUniqueness(org.neo4j.kernel.api.index.PropertyAccessor accessor,
int[] propertyKeyIds)
Verifies uniqueness of property values present in this index.
|
void |
verifyUniqueness(org.neo4j.kernel.api.index.PropertyAccessor accessor,
int[] propertyKeyIds,
List<Object> updatedPropertyValues)
Verifies uniqueness of updated property values.
|
addNewPartition, allDocumentsReader, close, create, drop, exists, flush, getPartitions, isOpen, isReadOnly, isValid, maybeRefreshBlocking, open, snapshot
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allDocumentsReader, create, drop, exists, flush, getPartitions, isOpen, isReadOnly, isValid, maybeRefreshBlocking, open, snapshot
public WritableDatabaseSchemaIndex(PartitionedIndexStorage storage, org.neo4j.kernel.api.schema.index.IndexDescriptor descriptor, org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig samplingConfig, WritableIndexPartitionFactory writableIndexPartitionFactory)
public LuceneIndexWriter getIndexWriter() throws IOException
getIndexWriter
in interface SchemaIndex
IOException
public org.neo4j.storageengine.api.schema.IndexReader getIndexReader() throws IOException
getIndexReader
in interface SchemaIndex
IOException
public org.neo4j.kernel.api.schema.index.IndexDescriptor getDescriptor()
getDescriptor
in interface SchemaIndex
public void verifyUniqueness(org.neo4j.kernel.api.index.PropertyAccessor accessor, int[] propertyKeyIds) throws IOException, org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
verifyUniqueness
in interface SchemaIndex
accessor
- the accessor to retrieve actual property values from the store.propertyKeyIds
- the ids of the properties to verify.IOException
org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
- if there are duplicates.UniquenessVerifier.verify(PropertyAccessor, int[])
public void verifyUniqueness(org.neo4j.kernel.api.index.PropertyAccessor accessor, int[] propertyKeyIds, List<Object> updatedPropertyValues) throws IOException, org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
verifyUniqueness
in interface SchemaIndex
accessor
- the accessor to retrieve actual property values from the store.propertyKeyIds
- the ids of the properties to verify.updatedPropertyValues
- the values to check uniqueness for.IOException
org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
- if there are duplicates.UniquenessVerifier.verify(PropertyAccessor, int[], List)
public boolean isOnline() throws IOException
isOnline
in interface SchemaIndex
true
if index is online, false
otherwiseIOException
public void markAsOnline() throws IOException
markAsOnline
in interface SchemaIndex
IOException
public void markAsFailed(String failure) throws IOException
markAsFailed
in interface SchemaIndex
failure
- the failure message.IOException
public boolean hasSinglePartition(List<AbstractIndexPartition> partitions)
public AbstractIndexPartition getFirstPartition(List<AbstractIndexPartition> partitions)
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.