Package herddb.proto
Class PduCodec
- java.lang.Object
-
- herddb.proto.PduCodec
-
public abstract class PduCodec extends Object
Codec for PDUs- Author:
- enrico.olivelli
-
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static byteTYPE_BOOLEANstatic byteTYPE_BYTEstatic byteTYPE_BYTEARRAYstatic byteTYPE_DOUBLEstatic byteTYPE_FLOATARRAYstatic byteTYPE_INTEGERstatic byteTYPE_LONGstatic byteTYPE_NULLstatic byteTYPE_SHORTstatic byteTYPE_STRINGstatic byteTYPE_TIMESTAMPstatic byteVERSION_3
-
Constructor Summary
Constructors Constructor Description PduCodec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PdudecodePdu(io.netty.buffer.ByteBuf in)static List<Object>normalizeParametersList(List<Object> parameters)Ensure that every parameter matches the same type as when we are marshalling/unmarshalling it.static ObjectreadObject(io.netty.buffer.ByteBuf dii)
-
-
-
Field Detail
-
VERSION_3
public static final byte VERSION_3
- See Also:
- Constant Field Values
-
TYPE_STRING
public static final byte TYPE_STRING
- See Also:
- Constant Field Values
-
TYPE_LONG
public static final byte TYPE_LONG
- See Also:
- Constant Field Values
-
TYPE_INTEGER
public static final byte TYPE_INTEGER
- See Also:
- Constant Field Values
-
TYPE_BYTEARRAY
public static final byte TYPE_BYTEARRAY
- See Also:
- Constant Field Values
-
TYPE_TIMESTAMP
public static final byte TYPE_TIMESTAMP
- See Also:
- Constant Field Values
-
TYPE_NULL
public static final byte TYPE_NULL
- See Also:
- Constant Field Values
-
TYPE_DOUBLE
public static final byte TYPE_DOUBLE
- See Also:
- Constant Field Values
-
TYPE_BOOLEAN
public static final byte TYPE_BOOLEAN
- See Also:
- Constant Field Values
-
TYPE_SHORT
public static final byte TYPE_SHORT
- See Also:
- Constant Field Values
-
TYPE_BYTE
public static final byte TYPE_BYTE
- See Also:
- Constant Field Values
-
TYPE_FLOATARRAY
public static final byte TYPE_FLOATARRAY
- See Also:
- Constant Field Values
-
-
Method Detail
-
decodePdu
public static Pdu decodePdu(io.netty.buffer.ByteBuf in) throws IOException
- Throws:
IOException
-
readObject
public static Object readObject(io.netty.buffer.ByteBuf dii)
-
normalizeParametersList
public static List<Object> normalizeParametersList(List<Object> parameters)
Ensure that every parameter matches the same type as when we are marshalling/unmarshalling it. This is useful for "local" mode: we do not want a different behaviour in local mode vs network mode and also we do not want unexpected JDBC parameter types on server-side processing.- Parameters:
parameters- the JDBC parameters- Returns:
- a new list with converted JDBC parameters
- See Also:
writeObject(io.netty.buffer.ByteBuf, java.lang.Object),readObject(io.netty.buffer.ByteBuf)
-
-