org.neo4j.kernel.api
Interface KernelAPI


public interface KernelAPI

The main API through which access to the Neo4j kernel is made, both read and write operations are supported as well as transactions. Changes to the graph (i.e. write operations) are performed via a transaction context where changes done inside the transaction are visible in read operations for statements executed within that transaction context. Once committed those changes are applied to the graph storage and made visible to all other transactions. Read operations not associated with any particular transaction can be performed via the read-only statement context.


Method Summary
 StatementContext newReadOnlyStatementContext()
          Returns a context that can be used for read operations that aren't associated with any specific transaction.
 TransactionContext newTransactionContext()
          Creates and returns a new TransactionContext capable of modifying the underlying graph.
 

Method Detail

newTransactionContext

TransactionContext newTransactionContext()
Creates and returns a new TransactionContext capable of modifying the underlying graph. Changes made in it are visible within the transaction and can be committed or rolled back.

Returns:
a new TransactionContext for modifying the underlying graph.

newReadOnlyStatementContext

StatementContext newReadOnlyStatementContext()
Returns a context that can be used for read operations that aren't associated with any specific transaction. Write operations on this statement will throw exception.

Returns:
a new StatementContext used for read operations not associated with any transaction.


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