org.neo4j.kernel.api.index
Interface IndexAccessor

All Known Implementing Classes:
IndexAccessor.Adapter

public interface IndexAccessor

Used for online operation of an index.


Nested Class Summary
static class IndexAccessor.Adapter
           
 
Method Summary
 void close()
          Closes this index accessor.
 void drop()
          Deletes this index as well as closes all used external resources.
 void force()
          Forces this index to disk.
 IndexReader newReader()
           
 void recover(Iterable<NodePropertyUpdate> updates)
          Apply a set of changes to this index.
 void updateAndCommit(Iterable<NodePropertyUpdate> updates)
          Apply a set of changes to this index.
 

Method Detail

drop

void drop()
          throws IOException
Deletes this index as well as closes all used external resources. There will not be any interactions after this call.

Throws:
IOException - if unable to drop index.

updateAndCommit

void updateAndCommit(Iterable<NodePropertyUpdate> updates)
                     throws IOException
Apply a set of changes to this index. Updates must be visible in readers created after this update.

Throws:
IOException

recover

void recover(Iterable<NodePropertyUpdate> updates)
             throws IOException
Apply a set of changes to this index. This method will be called instead of updateAndCommit(Iterable) during recovery of the database when starting up after a crash or similar. Updates given here may have already been applied to this index, so additional checks must be in place so that data doesn't get duplicated, but is idempotent.

Throws:
IOException

force

void force()
           throws IOException
Forces this index to disk. Called at certain points from within Neo4j for example when rotating the logical log. After completion of this call there cannot be any essential state that hasn't been forced to disk.

Throws:
IOException - if there was a problem forcing the state to persistent storage.

close

void close()
           throws IOException
Closes this index accessor. There will not be any interactions after this call. After completion of this call there cannot be any essential state that hasn't been forced to disk.

Throws:
IOException - if unable to close index.

newReader

IndexReader newReader()
Returns:
a new IndexReader responsible for looking up results in the index. The returned reader must honor repeatable reads.


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