org.neo4j.kernel
Class HighlyAvailableGraphDatabase
java.lang.Object
org.neo4j.kernel.AbstractGraphDatabase
org.neo4j.kernel.HighlyAvailableGraphDatabase
- All Implemented Interfaces:
- GraphDatabaseService, ResponseReceiver
public class HighlyAvailableGraphDatabase
- extends AbstractGraphDatabase
- implements GraphDatabaseService, ResponseReceiver
CONFIG_KEY_HA_MACHINE_ID
public static final String CONFIG_KEY_HA_MACHINE_ID
- See Also:
- Constant Field Values
CONFIG_KEY_HA_ZOO_KEEPER_SERVERS
public static final String CONFIG_KEY_HA_ZOO_KEEPER_SERVERS
- See Also:
- Constant Field Values
CONFIG_KEY_HA_SERVER
public static final String CONFIG_KEY_HA_SERVER
- See Also:
- Constant Field Values
CONFIG_KEY_HA_PULL_INTERVAL
public static final String CONFIG_KEY_HA_PULL_INTERVAL
- See Also:
- Constant Field Values
CONFIG_KEY_HA_SKELETON_DB_PATH
public static final String CONFIG_KEY_HA_SKELETON_DB_PATH
- See Also:
- Constant Field Values
HighlyAvailableGraphDatabase
public HighlyAvailableGraphDatabase(String storeDir,
Map<String,String> config)
- Will instantiate its own ZooKeeper broker
HighlyAvailableGraphDatabase
public HighlyAvailableGraphDatabase(String storeDir,
Map<String,String> config,
BrokerFactory brokerFactory)
- Only for testing
loadConfigurations
public static Map<String,String> loadConfigurations(String file)
getBroker
public Broker getBroker()
pullUpdates
public void pullUpdates()
getConfig
public Config getConfig()
- Specified by:
getConfig in class AbstractGraphDatabase
getStoreDir
public String getStoreDir()
- Specified by:
getStoreDir in class AbstractGraphDatabase
getManagementBean
public <T> T getManagementBean(Class<T> type)
- Specified by:
getManagementBean in class AbstractGraphDatabase
reevaluateMyself
protected void reevaluateMyself(Pair<Master,Machine> master)
beginTx
public Transaction beginTx()
- Specified by:
beginTx in interface GraphDatabaseService
createNode
public Node createNode()
- Specified by:
createNode in interface GraphDatabaseService
enableRemoteShell
public boolean enableRemoteShell()
- Specified by:
enableRemoteShell in interface GraphDatabaseService- Overrides:
enableRemoteShell in class AbstractGraphDatabase
enableRemoteShell
public boolean enableRemoteShell(Map<String,Serializable> initialProperties)
- Specified by:
enableRemoteShell in interface GraphDatabaseService- Overrides:
enableRemoteShell in class AbstractGraphDatabase
getAllNodes
public Iterable<Node> getAllNodes()
- Specified by:
getAllNodes 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
getRelationshipTypes
public Iterable<RelationshipType> getRelationshipTypes()
- Specified by:
getRelationshipTypes 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()
shutdown
public void shutdown(RuntimeException cause)
shutdown
public void shutdown()
- Specified by:
shutdown in interface GraphDatabaseService
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 SlaveContext getSlaveContext(int eventIdentifier)
- Specified by:
getSlaveContext in interface ResponseReceiver
receive
public <T> T receive(Response<T> response)
- Specified by:
receive in interface ResponseReceiver
newMaster
public void newMaster(Pair<Master,Machine> master,
Exception e)
- Specified by:
newMaster in interface ResponseReceiver
getMasterServerIfMaster
protected MasterServer getMasterServerIfMaster()
isMaster
public boolean isMaster()
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly in class AbstractGraphDatabase
index
public IndexManager index()
- Specified by:
index in interface GraphDatabaseService
Copyright © 2010 The Neo4j Graph Database Project. All Rights Reserved.