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
document s 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 DatabaseIndex
IOException
public void open() throws IOException
open
in interface DatabaseIndex
IOException
public boolean isOpen()
isOpen
in interface DatabaseIndex
public boolean isReadOnly()
isReadOnly
in interface DatabaseIndex
public boolean exists() throws IOException
exists
in interface DatabaseIndex
IOException
public boolean isValid()
isValid
in interface DatabaseIndex
public void drop() throws IOException
drop
in interface DatabaseIndex
IOException
public void flush() throws IOException
flush
in interface DatabaseIndex
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public LuceneAllDocumentsReader allDocumentsReader()
document
s in all partitions.allDocumentsReader
in interface DatabaseIndex
public org.neo4j.graphdb.ResourceIterator<File> snapshot() throws IOException
snapshot
in interface DatabaseIndex
IOException
WritableIndexSnapshotFileIterator
public void maybeRefreshBlocking() throws IOException
maybeRefreshBlocking
in interface DatabaseIndex
IOException
public AbstractIndexPartition addNewPartition() throws IOException
IOException
public List<AbstractIndexPartition> getPartitions()
getPartitions
in interface DatabaseIndex
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.