org.neo4j.kernel
Class AbstractGraphDatabase

java.lang.Object
  extended by org.neo4j.kernel.AbstractGraphDatabase
All Implemented Interfaces:
GraphDatabaseService
Direct Known Subclasses:
EmbeddedGraphDatabase, EmbeddedReadOnlyGraphDatabase, WrappedGraphDatabase

public abstract class AbstractGraphDatabase
extends Object
implements GraphDatabaseService

Exposes the methods getConfig()() and getManagementBeans(Class)() a.s.o.


Constructor Summary
protected AbstractGraphDatabase(String storeDir)
           
 
Method Summary
 Transaction beginTx()
          Starts a new transaction and associates it with the current thread.
protected abstract  void close()
           
protected  org.neo4j.kernel.impl.util.StringLogger createStringLogger()
           
 Iterable<Node> getAllNodes()
          Returns all nodes in the graph.
abstract  Config getConfig()
           
abstract  KernelData getKernelData()
           
<T> T
getManagementBean(Class<T> type)
          Deprecated. since Neo4j may now have multiple beans implementing the same bean interface, this method has been deprecated in favor of getSingleManagementBean(Class) and getManagementBeans(Class) . Version 1.5 of Neo4j will be the last version to contain this method.
abstract
<T> Collection<T>
getManagementBeans(Class<T> type)
           
 org.neo4j.kernel.impl.util.StringLogger getMessageLog()
           
 Iterable<RelationshipType> getRelationshipTypes()
          Returns all relationship types currently in the underlying store.
<T> T
getSingleManagementBean(Class<T> type)
           
 String getStoreDir()
           
protected  boolean isEphemeral()
           
 void shutdown()
          Shuts down Neo4j.
 String toString()
           
abstract  TransactionBuilder tx()
          Returns a new builder where some aspects of the behavior can be configured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.neo4j.graphdb.GraphDatabaseService
createNode, getNodeById, getReferenceNode, getRelationshipById, index, registerKernelEventHandler, registerTransactionEventHandler, unregisterKernelEventHandler, unregisterTransactionEventHandler
 

Constructor Detail

AbstractGraphDatabase

protected AbstractGraphDatabase(String storeDir)
Method Detail

createStringLogger

protected org.neo4j.kernel.impl.util.StringLogger createStringLogger()

shutdown

public final void shutdown()
Description copied from interface: GraphDatabaseService
Shuts down Neo4j. After this method has been invoked, it's invalid to invoke any methods in the Neo4j API and all references to this instance of GraphDatabaseService should be discarded.

Specified by:
shutdown in interface GraphDatabaseService

close

protected abstract void close()

getStoreDir

public final String getStoreDir()

getConfig

public abstract Config getConfig()

getMessageLog

public final org.neo4j.kernel.impl.util.StringLogger getMessageLog()

beginTx

public Transaction beginTx()
Description copied from interface: GraphDatabaseService
Starts a new transaction and associates it with the current thread.

Specified by:
beginTx in interface GraphDatabaseService
Returns:
a new transaction instance

tx

public abstract TransactionBuilder tx()
Returns a new builder where some aspects of the behavior can be configured. The transaction will ultimately begin when calling TransactionBuilder.begin().

Returns:
a builder for configuring transaction behavior and ultimately begin a transaction.

getManagementBean

@Deprecated
public final <T> T getManagementBean(Class<T> type)
Deprecated. since Neo4j may now have multiple beans implementing the same bean interface, this method has been deprecated in favor of getSingleManagementBean(Class) and getManagementBeans(Class) . Version 1.5 of Neo4j will be the last version to contain this method.

Get a single management bean. Delegates to getSingleManagementBean(Class).


getSingleManagementBean

public final <T> T getSingleManagementBean(Class<T> type)

getManagementBeans

public abstract <T> Collection<T> getManagementBeans(Class<T> type)

getKernelData

public abstract KernelData getKernelData()

isEphemeral

protected boolean isEphemeral()

toString

public String toString()
Overrides:
toString in class Object

getAllNodes

public Iterable<Node> getAllNodes()
Description copied from interface: GraphDatabaseService
Returns all nodes in the graph.

Specified by:
getAllNodes in interface GraphDatabaseService
Returns:
all nodes in the graph.

getRelationshipTypes

public Iterable<RelationshipType> getRelationshipTypes()
Description copied from interface: GraphDatabaseService
Returns all relationship types currently in the underlying store. Relationship types are added to the underlying store the first time they are used in a successfully commited node.createRelationshipTo(...). Note that this method is guaranteed to return all known relationship types, but it does not guarantee that it won't return more than that (e.g. it can return "historic" relationship types that no longer have any relationships in the node space).

Specified by:
getRelationshipTypes in interface GraphDatabaseService
Returns:
all relationship types in the underlying store


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