org.neo4j.kernel
Class HAGraphDb
java.lang.Object
org.neo4j.kernel.AbstractGraphDatabase
org.neo4j.kernel.HAGraphDb
- All Implemented Interfaces:
- org.neo4j.com.Client.ConnectionLostHandler, GraphDatabaseService, ResponseReceiver
public class HAGraphDb
- extends AbstractGraphDatabase
- implements GraphDatabaseService, ResponseReceiver
| Fields inherited from interface org.neo4j.com.Client.ConnectionLostHandler |
NO_ACTION |
| Methods inherited from class org.neo4j.kernel.AbstractGraphDatabase |
beginTx, createCaches, createStringLogger, getAllNodes, getManagementBean, getMessageLog, getRelationshipTypes, getSingleManagementBean, getStoreDir, isEphemeral, shutdown |
COPY_FROM_MASTER_TEMP
public static final String COPY_FROM_MASTER_TEMP
- See Also:
- Constant Field Values
HAGraphDb
public HAGraphDb(String storeDir,
Map<String,String> config)
- Will instantiate its own ZooKeeper broker and ClusterClient
HAGraphDb
public HAGraphDb(String storeDir,
Map<String,String> config,
BrokerFactory brokerFactory)
- ONLY FOR TESTING
Will instantiate its own ClusterClient
HAGraphDb
public HAGraphDb(String storeDir,
Map<String,String> config,
BrokerFactory brokerFactory,
ClusterClient clusterClient)
- ONLY FOR TESTING
getBroker
public Broker getBroker()
pullUpdates
public void pullUpdates()
getConfig
public Config getConfig()
- Specified by:
getConfig in class AbstractGraphDatabase
getManagementBeans
public <T> Collection<T> getManagementBeans(Class<T> type)
- Specified by:
getManagementBeans in class AbstractGraphDatabase
toString
public String toString()
- Overrides:
toString in class AbstractGraphDatabase
reconnect
public void reconnect(Exception e)
- Shuts down the broker, invalidating every connection to the zookeeper
cluster and starts it again. Should be called in case a ConnectionExpired
event is received, this is the equivalent of building the ZK connection
from start. Also triggers a master reelect, to make sure that the state
ZK ended up in during our absence is respected. The cluster manager is
not used outside of startup where this call should not happen and also it
doesn't keep a zoo client open - so is no reason to recreate it
- Specified by:
reconnect in interface ResponseReceiver
reevaluateMyself
protected void reevaluateMyself(org.neo4j.kernel.impl.nioneo.store.StoreId storeId)
tx
public TransactionBuilder tx()
- Specified by:
tx in class AbstractGraphDatabase
createNode
public Node createNode()
- Specified by:
createNode in interface GraphDatabaseService
getNodeById
public Node getNodeById(long id)
- Specified by:
getNodeById in interface GraphDatabaseService
getReferenceNode
public Node getReferenceNode()
- Specified by:
getReferenceNode in interface GraphDatabaseService
getRelationshipById
public Relationship getRelationshipById(long id)
- Specified by:
getRelationshipById in interface GraphDatabaseService
registerKernelEventHandler
public KernelEventHandler registerKernelEventHandler(KernelEventHandler handler)
- Specified by:
registerKernelEventHandler in interface GraphDatabaseService
registerTransactionEventHandler
public <T> TransactionEventHandler<T> registerTransactionEventHandler(TransactionEventHandler<T> handler)
- Specified by:
registerTransactionEventHandler in interface GraphDatabaseService
internalShutdown
public void internalShutdown(boolean rotateLogs)
close
protected void close()
- Specified by:
close in class AbstractGraphDatabase
unregisterKernelEventHandler
public KernelEventHandler unregisterKernelEventHandler(KernelEventHandler handler)
- Specified by:
unregisterKernelEventHandler in interface GraphDatabaseService
unregisterTransactionEventHandler
public <T> TransactionEventHandler<T> unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
- Specified by:
unregisterTransactionEventHandler in interface GraphDatabaseService
getSlaveContext
public org.neo4j.com.SlaveContext getSlaveContext(int eventIdentifier)
- Description copied from interface:
ResponseReceiver
- Returns a
SlaveContext instance that has eventIdentifier
as the event identifier.
- Specified by:
getSlaveContext in interface ResponseReceiver
- Parameters:
eventIdentifier - The event identifier of the returned slave context
- Returns:
- The slave context
receive
public <T> T receive(org.neo4j.com.Response<T> response)
- Specified by:
receive in interface ResponseReceiver
handle
public void handle(Exception e)
- Specified by:
handle in interface org.neo4j.com.Client.ConnectionLostHandler
newMaster
public void newMaster(Exception e)
- Specified by:
newMaster in interface ResponseReceiver
getMasterServerIfMaster
public MasterServer getMasterServerIfMaster()
isMaster
public boolean isMaster()
index
public IndexManager index()
- Specified by:
index in interface GraphDatabaseService
shutdownBroker
public void shutdownBroker()
getKernelData
public KernelData getKernelData()
- Specified by:
getKernelData in class AbstractGraphDatabase
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.