|
Neo4j Community | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.kernel.AbstractGraphDatabase
org.neo4j.kernel.InternalAbstractGraphDatabase
public abstract class InternalAbstractGraphDatabase
Base implementation of GraphDatabaseService. Responsible for creating services, handling dependencies between them, and lifecycle management of these.
Nested Class Summary | |
---|---|
static class |
InternalAbstractGraphDatabase.Configuration
|
static interface |
InternalAbstractGraphDatabase.Dependencies
|
Method Summary | ||
---|---|---|
Transaction |
beginTx()
Starts a new transaction and associates it with the current thread. |
|
Node |
createNode()
Creates a new node. |
|
boolean |
equals(Object o)
|
|
Iterable<Node> |
getAllNodes()
Returns all nodes in the graph. |
|
org.neo4j.kernel.configuration.Config |
getConfig()
|
|
DependencyResolver |
getDependencyResolver()
|
|
org.neo4j.kernel.info.DiagnosticsManager |
getDiagnosticsManager()
|
|
org.neo4j.kernel.guard.Guard |
getGuard()
|
|
IdGeneratorFactory |
getIdGeneratorFactory()
|
|
KernelData |
getKernelData()
|
|
org.neo4j.kernel.impl.core.KernelPanicEventGenerator |
getKernelPanicGenerator()
|
|
org.neo4j.kernel.impl.transaction.LockManager |
getLockManager()
|
|
org.neo4j.kernel.impl.util.StringLogger |
getMessageLog()
|
|
Node |
getNodeById(long id)
Looks up a node by id. |
|
org.neo4j.kernel.impl.core.NodeManager |
getNodeManager()
|
|
org.neo4j.kernel.impl.persistence.PersistenceSource |
getPersistenceSource()
|
|
Node |
getReferenceNode()
Returns the reference node, which is a "starting point" in the node space. |
|
Relationship |
getRelationshipById(long id)
Looks up a relationship by id. |
|
org.neo4j.kernel.impl.core.RelationshipTypeHolder |
getRelationshipTypeHolder()
|
|
Iterable<RelationshipType> |
getRelationshipTypes()
Returns all relationship types currently in the underlying store. |
|
String |
getStoreDir()
|
|
org.neo4j.kernel.impl.nioneo.store.StoreId |
getStoreId()
|
|
org.neo4j.kernel.impl.transaction.xaframework.TxIdGenerator |
getTxIdGenerator()
|
|
TransactionManager |
getTxManager()
|
|
org.neo4j.kernel.impl.transaction.XaDataSourceManager |
getXaDataSourceManager()
|
|
int |
hashCode()
|
|
IndexManager |
index()
Returns the IndexManager paired with this graph database service
and is the entry point for managing indexes coupled with this database. |
|
boolean |
isAvailable(long timeout)
Use this method to check if the database is in a usable state. |
|
KernelEventHandler |
registerKernelEventHandler(KernelEventHandler handler)
Registers handler as a handler for kernel events which
are generated from different places in the lifecycle of the kernel. |
|
|
registerTransactionEventHandler(TransactionEventHandler<T> handler)
Registers handler as a handler for transaction events which
are generated from different places in the lifecycle of each
transaction. |
|
void |
shutdown()
Shuts down Neo4j. |
|
String |
toString()
|
|
boolean |
transactionRunning()
|
|
TransactionBuilder |
tx()
|
|
KernelEventHandler |
unregisterKernelEventHandler(KernelEventHandler handler)
Unregisters handler from the list of kernel event handlers. |
|
|
unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
Unregisters handler from the list of transaction event handlers. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public DependencyResolver getDependencyResolver()
getDependencyResolver
in interface GraphDatabaseAPI
public boolean isAvailable(long timeout)
GraphDatabaseService
isAvailable
in interface GraphDatabaseService
public void shutdown()
GraphDatabaseService
shutdown
in interface GraphDatabaseService
public final String getStoreDir()
getStoreDir
in interface GraphDatabaseAPI
public org.neo4j.kernel.impl.nioneo.store.StoreId getStoreId()
getStoreId
in interface GraphDatabaseAPI
public Transaction beginTx()
GraphDatabaseService
beginTx
in interface GraphDatabaseService
public boolean transactionRunning()
transactionRunning
in class AbstractGraphDatabase
public String toString()
toString
in class Object
public Iterable<Node> getAllNodes()
GraphDatabaseService
getAllNodes
in interface GraphDatabaseService
public Iterable<RelationshipType> getRelationshipTypes()
GraphDatabaseService
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).
getRelationshipTypes
in interface GraphDatabaseService
public KernelEventHandler registerKernelEventHandler(KernelEventHandler handler)
GraphDatabaseService
handler
as a handler for kernel events which
are generated from different places in the lifecycle of the kernel.
To guarantee proper behaviour the handler should be registered right
after the graph database has been started. If the specified handler
instance has already been registered this method will do nothing.
registerKernelEventHandler
in interface GraphDatabaseService
handler
- the handler to receive events about different states
in the kernel lifecycle.
public <T> TransactionEventHandler<T> registerTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseService
handler
as a handler for transaction events which
are generated from different places in the lifecycle of each
transaction. To guarantee that the handler gets all events properly
it shouldn't be registered when the application is running (i.e. in the
middle of one or more transactions). If the specified handler instance
has already been registered this method will do nothing.
registerTransactionEventHandler
in interface GraphDatabaseService
T
- the type of state object used in the handler, see more
documentation about it at TransactionEventHandler
.handler
- the handler to receive events about different states
in transaction lifecycles.
public KernelEventHandler unregisterKernelEventHandler(KernelEventHandler handler)
GraphDatabaseService
handler
from the list of kernel event handlers.
If handler
hasn't been registered with
GraphDatabaseService.registerKernelEventHandler(KernelEventHandler)
prior to calling
this method an IllegalStateException
will be thrown.
After a successful call to this method the handler
will no
longer receive any kernel events.
unregisterKernelEventHandler
in interface GraphDatabaseService
handler
- the handler to receive events about different states
in the kernel lifecycle.
public <T> TransactionEventHandler<T> unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseService
handler
from the list of transaction event handlers.
If handler
hasn't been registered with
GraphDatabaseService.registerTransactionEventHandler(TransactionEventHandler)
prior
to calling this method an IllegalStateException
will be thrown.
After a successful call to this method the handler
will no
longer receive any transaction events.
unregisterTransactionEventHandler
in interface GraphDatabaseService
T
- the type of state object used in the handler, see more
documentation about it at TransactionEventHandler
.handler
- the handler to receive events about different states
in transaction lifecycles.
public Node createNode()
GraphDatabaseService
createNode
in interface GraphDatabaseService
public Node getNodeById(long id)
GraphDatabaseService
getNodeById
in interface GraphDatabaseService
id
- the id of the node
id
if foundpublic Relationship getRelationshipById(long id)
GraphDatabaseService
getRelationshipById
in interface GraphDatabaseService
id
- the id of the relationship
id
if foundpublic Node getReferenceNode()
GraphDatabaseService
getReferenceNode
in interface GraphDatabaseService
public TransactionBuilder tx()
tx
in interface GraphDatabaseAPI
public org.neo4j.kernel.guard.Guard getGuard()
getGuard
in interface GraphDatabaseAPI
public KernelData getKernelData()
getKernelData
in interface GraphDatabaseAPI
public IndexManager index()
GraphDatabaseService
IndexManager
paired with this graph database service
and is the entry point for managing indexes coupled with this database.
index
in interface GraphDatabaseService
IndexManager
for this database.public org.neo4j.kernel.configuration.Config getConfig()
public org.neo4j.kernel.impl.core.NodeManager getNodeManager()
getNodeManager
in interface GraphDatabaseAPI
public org.neo4j.kernel.impl.transaction.LockManager getLockManager()
getLockManager
in interface GraphDatabaseAPI
public org.neo4j.kernel.impl.transaction.XaDataSourceManager getXaDataSourceManager()
getXaDataSourceManager
in interface GraphDatabaseAPI
public TransactionManager getTxManager()
getTxManager
in interface GraphDatabaseAPI
public org.neo4j.kernel.impl.core.RelationshipTypeHolder getRelationshipTypeHolder()
getRelationshipTypeHolder
in interface GraphDatabaseAPI
public IdGeneratorFactory getIdGeneratorFactory()
getIdGeneratorFactory
in interface GraphDatabaseAPI
public org.neo4j.kernel.info.DiagnosticsManager getDiagnosticsManager()
getDiagnosticsManager
in interface GraphDatabaseAPI
public org.neo4j.kernel.impl.persistence.PersistenceSource getPersistenceSource()
getPersistenceSource
in interface GraphDatabaseAPI
public final org.neo4j.kernel.impl.util.StringLogger getMessageLog()
getMessageLog
in interface GraphDatabaseAPI
public org.neo4j.kernel.impl.transaction.xaframework.TxIdGenerator getTxIdGenerator()
getTxIdGenerator
in interface GraphDatabaseAPI
public org.neo4j.kernel.impl.core.KernelPanicEventGenerator getKernelPanicGenerator()
getKernelPanicGenerator
in interface GraphDatabaseAPI
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
Neo4j Community | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |