org.neo4j.kernel.ha
Class CommunicationProtocol

java.lang.Object
  extended by org.neo4j.kernel.ha.CommunicationProtocol
Direct Known Subclasses:
MasterClient, MasterServer

public abstract class CommunicationProtocol
extends Object


Nested Class Summary
protected static class CommunicationProtocol.AcquireLockSerializer
           
protected static class CommunicationProtocol.ByteData
           
protected static interface CommunicationProtocol.Deserializer<T>
           
protected static interface CommunicationProtocol.MasterCaller<T>
           
protected static interface CommunicationProtocol.ObjectSerializer<T>
           
static class CommunicationProtocol.RequestType
           
protected static interface CommunicationProtocol.Serializer
           
 
Field Summary
protected static CommunicationProtocol.Serializer EMPTY_SERIALIZER
           
protected static CommunicationProtocol.Deserializer<Integer> INTEGER_DESERIALIZER
           
protected static CommunicationProtocol.Deserializer<LockResult> LOCK_RESULT_DESERIALIZER
           
static int PORT
           
protected static CommunicationProtocol.Deserializer<Void> VOID_DESERIALIZER
           
 
Constructor Summary
CommunicationProtocol()
           
 
Method Summary
protected static org.jboss.netty.buffer.ChannelBuffer handleRequest(Master realMaster, org.jboss.netty.buffer.ChannelBuffer buffer, org.jboss.netty.channel.Channel channel, MasterServer server)
           
protected static IdAllocation readIdAllocation(org.jboss.netty.buffer.ChannelBuffer buffer)
           
protected static String readString(org.jboss.netty.buffer.ChannelBuffer buffer)
           
protected static TransactionStreams readTransactionStreams(org.jboss.netty.buffer.ChannelBuffer buffer)
           
protected static void writeSlaveContext(org.jboss.netty.buffer.ChannelBuffer buffer, SlaveContext context)
           
protected static void writeString(org.jboss.netty.buffer.ChannelBuffer buffer, String name)
           
protected static void writeTransactionStream(org.jboss.netty.buffer.ChannelBuffer dest, ByteBuffer readBuffer, TransactionStream transactionStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final int PORT
See Also:
Constant Field Values

LOCK_RESULT_DESERIALIZER

protected static final CommunicationProtocol.Deserializer<LockResult> LOCK_RESULT_DESERIALIZER

INTEGER_DESERIALIZER

protected static final CommunicationProtocol.Deserializer<Integer> INTEGER_DESERIALIZER

VOID_DESERIALIZER

protected static final CommunicationProtocol.Deserializer<Void> VOID_DESERIALIZER

EMPTY_SERIALIZER

protected static final CommunicationProtocol.Serializer EMPTY_SERIALIZER
Constructor Detail

CommunicationProtocol

public CommunicationProtocol()
Method Detail

handleRequest

protected static org.jboss.netty.buffer.ChannelBuffer handleRequest(Master realMaster,
                                                                    org.jboss.netty.buffer.ChannelBuffer buffer,
                                                                    org.jboss.netty.channel.Channel channel,
                                                                    MasterServer server)
                                                             throws IOException
Throws:
IOException

readTransactionStreams

protected static TransactionStreams readTransactionStreams(org.jboss.netty.buffer.ChannelBuffer buffer)

writeTransactionStream

protected static void writeTransactionStream(org.jboss.netty.buffer.ChannelBuffer dest,
                                             ByteBuffer readBuffer,
                                             TransactionStream transactionStream)
                                      throws IOException
Throws:
IOException

readIdAllocation

protected static IdAllocation readIdAllocation(org.jboss.netty.buffer.ChannelBuffer buffer)

writeString

protected static void writeString(org.jboss.netty.buffer.ChannelBuffer buffer,
                                  String name)

readString

protected static String readString(org.jboss.netty.buffer.ChannelBuffer buffer)

writeSlaveContext

protected static void writeSlaveContext(org.jboss.netty.buffer.ChannelBuffer buffer,
                                        SlaveContext context)


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