|
Neo4j Enterprise | |||||||||
| 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.HighlyAvailableGraphDatabase
public class HighlyAvailableGraphDatabase
| Field Summary | |
|---|---|
static String |
CONFIG_KEY_ALLOW_INIT_CLUSTER
|
static String |
CONFIG_KEY_HA_CLUSTER_NAME
|
static String |
CONFIG_KEY_HA_MACHINE_ID
|
static String |
CONFIG_KEY_HA_PULL_INTERVAL
|
static String |
CONFIG_KEY_HA_SERVER
|
static String |
CONFIG_KEY_HA_ZOO_KEEPER_SERVERS
|
| Constructor Summary | |
|---|---|
HighlyAvailableGraphDatabase(String storeDir,
Map<String,String> config)
Will instantiate its own ZooKeeper broker |
|
HighlyAvailableGraphDatabase(String storeDir,
Map<String,String> config,
BrokerFactory brokerFactory)
Only for testing (and BackupFromHaCluster) |
|
| Method Summary | ||
|---|---|---|
Transaction |
beginTx()
Starts a new transaction and associates it with the current thread. |
|
Node |
createNode()
Creates a new node. |
|
Iterable<Node> |
getAllNodes()
Returns all nodes in the node space. |
|
Broker |
getBroker()
|
|
Config |
getConfig()
|
|
|
getManagementBean(Class<T> type)
|
|
MasterServer |
getMasterServerIfMaster()
|
|
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. |
|
SlaveContext |
getSlaveContext(int eventIdentifier)
|
|
String |
getStoreDir()
|
|
IndexManager |
index()
Returns the IndexManager paired with this graph database service
and is the entry point for managing indexes coupled with this database. |
|
void |
internalShutdown()
|
|
boolean |
isMaster()
|
|
boolean |
isReadOnly()
|
|
static Map<String,String> |
loadConfigurations(String file)
|
|
void |
newMaster(Pair<Master,Machine> master,
Exception e)
|
|
void |
pullUpdates()
|
|
|
receive(Response<T> response)
|
|
protected void |
reevaluateMyself(Pair<Master,Machine> master,
org.neo4j.kernel.impl.nioneo.store.StoreId storeId)
|
|
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. |
|
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 |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CONFIG_KEY_HA_MACHINE_ID
public static final String CONFIG_KEY_HA_ZOO_KEEPER_SERVERS
public static final String CONFIG_KEY_HA_SERVER
public static final String CONFIG_KEY_HA_CLUSTER_NAME
public static final String CONFIG_KEY_HA_PULL_INTERVAL
public static final String CONFIG_KEY_ALLOW_INIT_CLUSTER
| Constructor Detail |
|---|
public HighlyAvailableGraphDatabase(String storeDir,
Map<String,String> config)
public HighlyAvailableGraphDatabase(String storeDir,
Map<String,String> config,
BrokerFactory brokerFactory)
BackupFromHaCluster)
| Method Detail |
|---|
public static Map<String,String> loadConfigurations(String file)
public Broker getBroker()
public void pullUpdates()
public Config getConfig()
getConfig in class AbstractGraphDatabasepublic String getStoreDir()
getStoreDir in class AbstractGraphDatabasepublic <T> T getManagementBean(Class<T> type)
getManagementBean in class AbstractGraphDatabase
protected void reevaluateMyself(Pair<Master,Machine> master,
org.neo4j.kernel.impl.nioneo.store.StoreId storeId)
public Transaction beginTx()
GraphDatabaseService
beginTx in interface GraphDatabaseServicepublic Node createNode()
GraphDatabaseService
createNode in interface GraphDatabaseServicepublic Iterable<Node> getAllNodes()
GraphDatabaseService
getAllNodes in interface GraphDatabaseServicepublic Node getNodeById(long id)
GraphDatabaseService
getNodeById in interface GraphDatabaseServiceid - the id of the node
id if foundpublic Node getReferenceNode()
GraphDatabaseService
getReferenceNode in interface GraphDatabaseServicepublic Relationship getRelationshipById(long id)
GraphDatabaseService
getRelationshipById in interface GraphDatabaseServiceid - the id of the relationship
id if foundpublic Iterable<RelationshipType> getRelationshipTypes()
GraphDatabaseServicenode.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 GraphDatabaseServicepublic KernelEventHandler registerKernelEventHandler(KernelEventHandler handler)
GraphDatabaseServicehandler 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 GraphDatabaseServicehandler - the handler to receive events about different states
in the kernel lifecycle.
public <T> TransactionEventHandler<T> registerTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseServicehandler 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 GraphDatabaseServiceT - 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 void internalShutdown()
public void shutdown()
GraphDatabaseService
shutdown in interface GraphDatabaseServicepublic KernelEventHandler unregisterKernelEventHandler(KernelEventHandler handler)
GraphDatabaseServicehandler 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 GraphDatabaseServicehandler - the handler to receive events about different states
in the kernel lifecycle.
public <T> TransactionEventHandler<T> unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseServicehandler 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 GraphDatabaseServiceT - 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 SlaveContext getSlaveContext(int eventIdentifier)
getSlaveContext in interface ResponseReceiverpublic <T> T receive(Response<T> response)
receive in interface ResponseReceiver
public void newMaster(Pair<Master,Machine> master,
Exception e)
newMaster in interface ResponseReceiverpublic MasterServer getMasterServerIfMaster()
public boolean isMaster()
public boolean isReadOnly()
isReadOnly in class AbstractGraphDatabasepublic IndexManager index()
GraphDatabaseServiceIndexManager paired with this graph database service
and is the entry point for managing indexes coupled with this database.
index in interface GraphDatabaseServiceIndexManager for this database.
|
Neo4j Enterprise | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||