com.sleepycat.je.rep.utilint
Class BinaryProtocol.SimpleMessage
java.lang.Object
com.sleepycat.je.rep.utilint.BinaryProtocol.Message
com.sleepycat.je.rep.utilint.BinaryProtocol.SimpleMessage
- All Implemented Interfaces:
- BinaryProtocol.WireFormatable
- Direct Known Subclasses:
- BinaryNodeStateProtocol.BinaryNodeStateRequest, BinaryNodeStateProtocol.BinaryNodeStateResponse, BinaryProtocol.ProtocolVersion, BinaryProtocol.RejectMessage, Protocol.BlockInfo, Protocol.BlockListEnd, Protocol.BlockListStart, Protocol.DbBlocks, Protocol.DiffAreaEnd, Protocol.DiffAreaStart, Protocol.Done, Protocol.Done, Protocol.EnvDiff, Protocol.EnvInfo, Protocol.FeederInfoReq, Protocol.FeederInfoResp, Protocol.FileListReq, Protocol.FileListResp, Protocol.FileReq, Protocol.FileStart, Protocol.HandshakeMessage, Protocol.RemoteDiffRequest, Protocol.RemoteRecord, Protocol.RestoreResponse, Protocol.ShutdownRequest
- Enclosing class:
- BinaryProtocol
protected abstract class BinaryProtocol.SimpleMessage
- extends BinaryProtocol.Message
Base class for simple messages. Ones where performance is not of the
utmost importance and reflection can be used to simplify message
serialization and de-serialization.
BinaryProtocol.SimpleMessage
protected BinaryProtocol.SimpleMessage()
wireFormat
protected ByteBuffer wireFormat(Object... arguments)
- Assembles a sequence of arguments into its byte based wire format.
The method does the serialization in two steps. In step 1, it
calculates the length of the buffer. In step 2, it assembles the
bytes into the allocated buffer. The interpretive approach used here
is suitable for the low performance requirements of the handshake
protocol, but not for the core data stream itself. It's for this
reason that the method is associated with the Handshake message
class and not the Message class.
- Parameters:
opId
- the operation indicated by the messagearguments
- the arguments to be passed in the message
- Returns:
- a byte buffer containing the serialized form of the message
getRepNodeImplArray
protected RepNodeImpl[] getRepNodeImplArray(ByteBuffer buffer)
getStringArray
protected String[] getStringArray(ByteBuffer buffer)
- Reconstitutes an array of strings.
- Parameters:
buffer
-
- Returns:
getByteArray
protected byte[] getByteArray(ByteBuffer buffer)
getBoolean
protected boolean getBoolean(ByteBuffer buffer)
getVLSN
protected VLSN getVLSN(ByteBuffer buffer)
getEnum
protected <T extends Enum<T>> T getEnum(Class<T> enumType,
ByteBuffer buffer)
getDouble
protected Double getDouble(ByteBuffer buffer)
getNameIdPair
protected NameIdPair getNameIdPair(ByteBuffer buffer)
Copyright (c) 2004-2012 Oracle. All rights reserved.