|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.integration.ip.mind.MindRpcSerializer
public class MindRpcSerializer
Spring Serializer and Deserializer interfaces
for mind protocol.
| Field Summary | |
|---|---|
protected int |
maxMessageSize
|
| Constructor Summary | |
|---|---|
MindRpcSerializer()
|
|
| Method Summary | |
|---|---|
protected void |
checkClosure(int bite)
|
MindRpcMessageHolder |
deserialize(java.io.InputStream inputStream)
|
protected byte[] |
readBytes(java.io.InputStream inputStream,
int length)
Helper method to read bytes from a stream. |
protected int[] |
readHeader(java.io.InputStream inputStream)
Reads the first line as a protocol header and parses sizes of underlying headers and content. |
protected java.util.Map<java.lang.String,java.lang.String> |
readHeaders(java.io.InputStream inputStream,
int length)
Reads a message headers from inputstream with a given length. |
void |
serialize(MindRpcMessageHolder object,
java.io.OutputStream outputStream)
|
void |
setMaxMessageSize(int maxMessageSize)
Sets the max message size for transport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int maxMessageSize
| Constructor Detail |
|---|
public MindRpcSerializer()
| Method Detail |
|---|
public MindRpcMessageHolder deserialize(java.io.InputStream inputStream)
throws java.io.IOException
deserialize in interface org.springframework.core.serializer.Deserializer<MindRpcMessageHolder>java.io.IOExceptionDeserializer.deserialize(java.io.InputStream)
public void serialize(MindRpcMessageHolder object,
java.io.OutputStream outputStream)
throws java.io.IOException
serialize in interface org.springframework.core.serializer.Serializer<MindRpcMessageHolder>java.io.IOExceptionSerializer.serialize(java.lang.Object, java.io.OutputStream)public void setMaxMessageSize(int maxMessageSize)
maxMessageSize - the length of max message
protected int[] readHeader(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - the input stream
java.io.IOException - if read error occured
protected java.util.Map<java.lang.String,java.lang.String> readHeaders(java.io.InputStream inputStream,
int length)
throws java.io.IOException
inputStream - the input streamlength - how much to read from a stream
java.io.IOException - if error occured
protected byte[] readBytes(java.io.InputStream inputStream,
int length)
throws java.io.IOException
inputStream - the input streamlength - how much to read
java.io.IOException - if error occured
protected void checkClosure(int bite)
throws java.io.IOException
java.io.IOException
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||