org.neo4j.kernel.ha
Class MasterClient
java.lang.Object
org.neo4j.com.Client<Master>
org.neo4j.kernel.ha.MasterClient
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelPipelineFactory, Master
public class MasterClient
- extends Client<Master>
- implements Master
The Master a slave should use to communicate with its master. It
serializes requests and sends them to the master, more specifically
MasterServer (which delegates to MasterImpl
on the master side.
|
Constructor Summary |
MasterClient(Machine machine,
org.neo4j.graphdb.GraphDatabaseService graphDb)
|
MasterClient(String hostNameOrIp,
int port,
org.neo4j.graphdb.GraphDatabaseService graphDb)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCK_RESULT_DESERIALIZER
protected static final Deserializer<LockResult> LOCK_RESULT_DESERIALIZER
MasterClient
public MasterClient(String hostNameOrIp,
int port,
org.neo4j.graphdb.GraphDatabaseService graphDb)
MasterClient
public MasterClient(Machine machine,
org.neo4j.graphdb.GraphDatabaseService graphDb)
shouldCheckStoreId
protected boolean shouldCheckStoreId(RequestType<Master> type)
- Overrides:
shouldCheckStoreId in class Client<Master>
allocateIds
public Response<IdAllocation> allocateIds(org.neo4j.kernel.IdType idType)
- Specified by:
allocateIds in interface Master
createRelationshipType
public Response<Integer> createRelationshipType(SlaveContext context,
String name)
- Specified by:
createRelationshipType in interface Master
acquireNodeWriteLock
public Response<LockResult> acquireNodeWriteLock(SlaveContext context,
long... nodes)
- Specified by:
acquireNodeWriteLock in interface Master
acquireNodeReadLock
public Response<LockResult> acquireNodeReadLock(SlaveContext context,
long... nodes)
- Specified by:
acquireNodeReadLock in interface Master
acquireRelationshipWriteLock
public Response<LockResult> acquireRelationshipWriteLock(SlaveContext context,
long... relationships)
- Specified by:
acquireRelationshipWriteLock in interface Master
acquireRelationshipReadLock
public Response<LockResult> acquireRelationshipReadLock(SlaveContext context,
long... relationships)
- Specified by:
acquireRelationshipReadLock in interface Master
commitSingleResourceTransaction
public Response<Long> commitSingleResourceTransaction(SlaveContext context,
String resource,
TxExtractor txGetter)
- Specified by:
commitSingleResourceTransaction in interface Master
finishTransaction
public Response<Void> finishTransaction(SlaveContext context)
- Specified by:
finishTransaction in interface Master
rollbackOngoingTransactions
public void rollbackOngoingTransactions(SlaveContext context)
pullUpdates
public Response<Void> pullUpdates(SlaveContext context)
- Specified by:
pullUpdates in interface Master
getMasterIdForCommittedTx
public Response<Integer> getMasterIdForCommittedTx(long txId)
- Specified by:
getMasterIdForCommittedTx in interface Master
copyStore
public Response<Void> copyStore(SlaveContext context,
StoreWriter writer)
- Specified by:
copyStore in interface Master
readIdAllocation
protected static IdAllocation readIdAllocation(org.jboss.netty.buffer.ChannelBuffer buffer)
Copyright © 2011 The Neo4j Graph Database Project. All Rights Reserved.