T
- event data this deserializer is responsible forpublic abstract class AbstractRowsEventDataDeserializer<T extends EventData> extends Object implements EventDataDeserializer<T>
Current ColumnType
to java type mapping is following:
At the momentColumnType.TINY
: IntegerColumnType.SHORT
: IntegerColumnType.LONG
: IntegerColumnType.INT24
: IntegerColumnType.YEAR
: IntegerColumnType.ENUM
: IntegerColumnType.SET
: LongColumnType.LONGLONG
: LongColumnType.FLOAT
: FloatColumnType.DOUBLE
: DoubleColumnType.BIT
: java.util.BitSetColumnType.DATETIME
: java.util.DateColumnType.DATETIME_V2
: java.util.DateColumnType.NEWDECIMAL
: java.math.BigDecimalColumnType.TIMESTAMP
: java.sql.TimestampColumnType.TIMESTAMP_V2
: java.sql.TimestampColumnType.DATE
: java.sql.DateColumnType.TIME
: java.sql.TimeColumnType.TIME_V2
: java.sql.TimeColumnType.VARCHAR
: StringColumnType.VAR_STRING
: StringColumnType.STRING
: StringColumnType.BLOB
: byte[]ColumnType.GEOMETRY
: byte[]
ColumnType.GEOMETRY
is unsupported.Constructor and Description |
---|
AbstractRowsEventDataDeserializer(Map<Long,TableMapEventData> tableMapEventByTableId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserialize
public AbstractRowsEventDataDeserializer(Map<Long,TableMapEventData> tableMapEventByTableId)
protected Serializable[] deserializeRow(long tableId, BitSet includedColumns, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeCell(ColumnType type, int meta, int length, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeBit(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeTiny(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeShort(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeInt24(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeLong(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeLongLong(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeFloat(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeDouble(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeNewDecimal(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeDate(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeTime(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeTimeV2(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeTimestamp(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeTimestampV2(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeDatetime(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeDatetimeV2(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeYear(ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeString(int length, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeVarString(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeBlob(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeEnum(int length, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeSet(int length, ByteArrayInputStream inputStream) throws IOException
IOException
protected Serializable deserializeGeometry(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
protected byte[] deserializeJson(int meta, ByteArrayInputStream inputStream) throws IOException
JSON
value on the input stream, and return MySQL's internal binary representation
of the JSON value. See JsonBinary
for
a utility to parse this binary representation into something more useful, including a string representation.meta
- the number of bytes in which the length of the JSON value is found first on the input streaminputStream
- the stream containing the JSON valueIOException
- if there is a problem reading the input streamprotected Long asUnixTime(int year, int month, int day, int hour, int minute, int second, int millis)
protected int deserializeFractionalSeconds(int meta, ByteArrayInputStream inputStream) throws IOException
IOException
public static BigDecimal asBigDecimal(int precision, int scale, byte[] value)
Copyright © 2020. All rights reserved.