org.neo4j.kernel.impl.persistence
Interface PersistenceSource

All Known Implementing Classes:
NioNeoDbPersistenceSource

public interface PersistenceSource

A data resource that Neo4j kernel uses to persist entities.

All persistence sources for the kernel should implement this interface.


Method Summary
 NeoStoreTransaction createTransaction(XaConnection connection)
          Creates a resource connection to this persistence source.
 long getHighestPossibleIdInUse(Class<?> clazz)
           
 long getNumberOfIdsInUse(Class<?> clazz)
           
 XaDataSource getXaDataSource()
           
 long nextId(Class<?> clazz)
          If the persistence source is responsible for id generation it must implement this method.
 

Method Detail

createTransaction

NeoStoreTransaction createTransaction(XaConnection connection)
Creates a resource connection to this persistence source.

Parameters:
connection - the XaConnection to use.
Returns:
a newly opened NeoStoreTransaction to this PersistenceSource

nextId

long nextId(Class<?> clazz)
If the persistence source is responsible for id generation it must implement this method.

Parameters:
clazz - the data structure to get next free unique id for
Returns:
the next free unique id for clazz

getHighestPossibleIdInUse

long getHighestPossibleIdInUse(Class<?> clazz)

getNumberOfIdsInUse

long getNumberOfIdsInUse(Class<?> clazz)

getXaDataSource

XaDataSource getXaDataSource()


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