org.neo4j.kernel.ha
Class MasterServer

java.lang.Object
  extended by org.neo4j.kernel.ha.CommunicationProtocol
      extended by org.neo4j.kernel.ha.MasterServer
All Implemented Interfaces:
org.jboss.netty.channel.ChannelPipelineFactory

public class MasterServer
extends CommunicationProtocol
implements org.jboss.netty.channel.ChannelPipelineFactory

Sits on the master side, receiving serialized requests from slaves (via MasterClient). Delegates actual work to MasterImpl.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.neo4j.kernel.ha.CommunicationProtocol
CommunicationProtocol.AcquireLockSerializer, CommunicationProtocol.ByteData, CommunicationProtocol.Deserializer<T>, CommunicationProtocol.MasterCaller<T>, CommunicationProtocol.ObjectSerializer<T>, CommunicationProtocol.RequestType, CommunicationProtocol.Serializer
 
Field Summary
 
Fields inherited from class org.neo4j.kernel.ha.CommunicationProtocol
EMPTY_SERIALIZER, INTEGER_DESERIALIZER, LOCK_RESULT_DESERIALIZER, PORT, VOID_DESERIALIZER
 
Constructor Summary
MasterServer(Master realMaster, int port, String storeDir)
           
 
Method Summary
 org.jboss.netty.channel.ChannelPipeline getPipeline()
           
 Map<Integer,Collection<SlaveContext>> getSlaveInformation()
           
protected  Pair<org.jboss.netty.buffer.ChannelBuffer,ByteBuffer> mapSlave(org.jboss.netty.channel.Channel channel, SlaveContext slave)
           
 void shutdown()
           
protected  void unmapSlave(org.jboss.netty.channel.Channel channel, SlaveContext slave)
           
 
Methods inherited from class org.neo4j.kernel.ha.CommunicationProtocol
handleRequest, readIdAllocation, readString, readTransactionStreams, writeSlaveContext, writeString, writeTransactionStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterServer

public MasterServer(Master realMaster,
                    int port,
                    String storeDir)
Method Detail

getPipeline

public org.jboss.netty.channel.ChannelPipeline getPipeline()
                                                    throws Exception
Specified by:
getPipeline in interface org.jboss.netty.channel.ChannelPipelineFactory
Throws:
Exception

mapSlave

protected Pair<org.jboss.netty.buffer.ChannelBuffer,ByteBuffer> mapSlave(org.jboss.netty.channel.Channel channel,
                                                                         SlaveContext slave)

unmapSlave

protected void unmapSlave(org.jboss.netty.channel.Channel channel,
                          SlaveContext slave)

shutdown

public void shutdown()

getSlaveInformation

public Map<Integer,Collection<SlaveContext>> getSlaveInformation()


Copyright © 2010 The Neo4j Graph Database Project. All Rights Reserved.