T - - particular index implementationpublic class WritableAbstractDatabaseIndex<T extends AbstractLuceneIndex> extends Object implements DatabaseIndex
| Constructor and Description |
|---|
WritableAbstractDatabaseIndex(T luceneIndex) |
| Modifier and Type | Method and Description |
|---|---|
AbstractIndexPartition |
addNewPartition()
Add new partition to the index.
|
LuceneAllDocumentsReader |
allDocumentsReader()
Creates an iterable over all
documents in all partitions. |
void |
close() |
void |
create()
Creates new index.
|
void |
drop()
Close index and deletes all it's partitions.
|
boolean |
exists()
Check lucene index existence within all allocated partitions.
|
void |
flush()
Commits all index partitions.
|
List<AbstractIndexPartition> |
getPartitions()
Get index partitions
|
boolean |
isOpen()
Check if index is open or not
|
boolean |
isReadOnly()
Check if index is opened in read only mode
|
boolean |
isValid()
Verify state of the index.
|
void |
maybeRefreshBlocking()
Refresh all partitions to make newly inserted data visible for readers.
|
void |
open()
Open index with all allocated partitions.
|
org.neo4j.graphdb.ResourceIterator<File> |
snapshot()
Snapshot of all file in all index partitions.
|
public WritableAbstractDatabaseIndex(T luceneIndex)
public void create()
throws IOException
Index creation do not automatically open it. To be able to use index please open it first.
create in interface DatabaseIndexIOExceptionpublic void open()
throws IOException
open in interface DatabaseIndexIOExceptionpublic boolean isOpen()
isOpen in interface DatabaseIndexpublic boolean isReadOnly()
isReadOnly in interface DatabaseIndexpublic boolean exists()
throws IOException
exists in interface DatabaseIndexIOExceptionpublic boolean isValid()
isValid in interface DatabaseIndexpublic void drop()
throws IOException
drop in interface DatabaseIndexIOExceptionpublic void flush()
throws IOException
flush in interface DatabaseIndexIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic LuceneAllDocumentsReader allDocumentsReader()
documents in all partitions.allDocumentsReader in interface DatabaseIndexpublic org.neo4j.graphdb.ResourceIterator<File> snapshot() throws IOException
snapshot in interface DatabaseIndexIOExceptionWritableIndexSnapshotFileIteratorpublic void maybeRefreshBlocking()
throws IOException
maybeRefreshBlocking in interface DatabaseIndexIOExceptionpublic AbstractIndexPartition addNewPartition() throws IOException
IOExceptionpublic List<AbstractIndexPartition> getPartitions()
getPartitions in interface DatabaseIndexCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.