|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.kernel.AbstractGraphDatabase
org.neo4j.tooling.wrap.WrappedGraphDatabase
public abstract class WrappedGraphDatabase
Field Summary | |
---|---|
protected GraphDatabaseService |
graphdb
|
Fields inherited from class org.neo4j.kernel.AbstractGraphDatabase |
---|
caches |
Constructor Summary | |
---|---|
WrappedGraphDatabase(GraphDatabaseService graphdb)
|
Method Summary | ||
---|---|---|
protected WrappedIndex.WrappedNodeIndex |
automaticNodeIndex(ReadableIndex<Node> index)
|
|
protected WrappedIndex.WrappedRelationshipIndex |
automaticRelationshipIndex(ReadableRelationshipIndex index)
|
|
Transaction |
beginTx()
Starts a new transaction and associates it with the current thread. |
|
protected void |
close()
|
|
Node |
createNode()
Creates a new node. |
|
protected org.neo4j.kernel.impl.util.StringLogger |
createStringLogger()
|
|
boolean |
equals(Object obj)
|
|
Iterable<Node> |
getAllNodes()
Returns all nodes in the graph. |
|
Config |
getConfig()
|
|
KernelData |
getKernelData()
|
|
|
getManagementBeans(Class<T> type)
|
|
Node |
getNodeById(long id)
Looks up a node by id. |
|
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. |
|
Iterable<RelationshipType> |
getRelationshipTypes()
Returns all relationship types currently in the underlying store. |
|
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. |
|
protected Lock |
lock(Lock lock)
|
|
protected abstract WrappedNode<? extends WrappedGraphDatabase> |
node(Node node,
boolean created)
|
|
protected WrappedIndex.WrappedNodeIndex |
nodeIndex(Index<Node> index,
String indexName)
|
|
protected void |
onBeginTransaction()
|
|
protected void |
onFailureTransaction()
|
|
protected void |
onFinishTransaction()
|
|
protected void |
onNodeCreate()
|
|
protected void |
onShutdown()
|
|
protected void |
onSuccessTransaction()
|
|
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. |
|
protected abstract WrappedRelationship<? extends WrappedGraphDatabase> |
relationship(Relationship relationship,
boolean created)
|
|
protected WrappedIndex.WrappedRelationshipIndex |
relationshipIndex(RelationshipIndex index,
String indexName)
|
|
String |
toString()
|
|
TransactionBuilder |
tx()
Returns a new builder where some aspects of the behavior can be configured. |
|
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 org.neo4j.kernel.AbstractGraphDatabase |
---|
createCaches, getManagementBean, getMessageLog, getSingleManagementBean, getStoreDir, isEphemeral, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final GraphDatabaseService graphdb
Constructor Detail |
---|
public WrappedGraphDatabase(GraphDatabaseService graphdb)
Method Detail |
---|
protected org.neo4j.kernel.impl.util.StringLogger createStringLogger()
createStringLogger
in class AbstractGraphDatabase
public final int hashCode()
hashCode
in class Object
public final boolean equals(Object obj)
equals
in class Object
public final String toString()
toString
in class AbstractGraphDatabase
protected abstract WrappedNode<? extends WrappedGraphDatabase> node(Node node, boolean created)
protected abstract WrappedRelationship<? extends WrappedGraphDatabase> relationship(Relationship relationship, boolean created)
protected Lock lock(Lock lock)
protected WrappedIndex.WrappedNodeIndex nodeIndex(Index<Node> index, String indexName)
protected WrappedIndex.WrappedRelationshipIndex relationshipIndex(RelationshipIndex index, String indexName)
protected WrappedIndex.WrappedNodeIndex automaticNodeIndex(ReadableIndex<Node> index)
protected WrappedIndex.WrappedRelationshipIndex automaticRelationshipIndex(ReadableRelationshipIndex index)
protected void onBeginTransaction() throws TransactionNotAllowedException
TransactionNotAllowedException
protected void onSuccessTransaction()
protected void onFailureTransaction()
protected void onFinishTransaction()
protected void onNodeCreate()
protected void onShutdown()
public final Transaction beginTx()
GraphDatabaseService
beginTx
in interface GraphDatabaseService
beginTx
in class AbstractGraphDatabase
public final Node createNode()
GraphDatabaseService
public final Node getNodeById(long id)
GraphDatabaseService
id
- the id of the node
id
if foundpublic final Relationship getRelationshipById(long id)
GraphDatabaseService
id
- the id of the relationship
id
if foundpublic final Node getReferenceNode()
GraphDatabaseService
public final Iterable<Node> getAllNodes()
GraphDatabaseService
getAllNodes
in interface GraphDatabaseService
getAllNodes
in class AbstractGraphDatabase
public final 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
getRelationshipTypes
in class AbstractGraphDatabase
protected final void close()
close
in class AbstractGraphDatabase
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.
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 <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.
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 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.
handler
- the handler to receive events about different states
in the kernel lifecycle.
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.
handler
- the handler to receive events about different states
in the kernel lifecycle.
public IndexManager index()
GraphDatabaseService
IndexManager
paired with this graph database service
and is the entry point for managing indexes coupled with this database.
IndexManager
for this database.public TransactionBuilder tx()
AbstractGraphDatabase
TransactionBuilder.begin()
.
tx
in class AbstractGraphDatabase
public Config getConfig()
getConfig
in class AbstractGraphDatabase
public <T> Collection<T> getManagementBeans(Class<T> type)
getManagementBeans
in class AbstractGraphDatabase
public KernelData getKernelData()
getKernelData
in class AbstractGraphDatabase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |