com.github.shyiko.mysql.binlog.event.deserialization
Class AbstractRowsEventDataDeserializer<T extends EventData>
java.lang.Object
com.github.shyiko.mysql.binlog.event.deserialization.AbstractRowsEventDataDeserializer<T>
- Type Parameters:
T
- event data this deserializer is responsible for
- All Implemented Interfaces:
- EventDataDeserializer<T>
- Direct Known Subclasses:
- DeleteRowsEventDataDeserializer, UpdateRowsEventDataDeserializer, WriteRowsEventDataDeserializer
public abstract class AbstractRowsEventDataDeserializer<T extends EventData>
- extends Object
- implements EventDataDeserializer<T>
Whole class is basically a mix of open-replicator's
AbstractRowEventParser and MySQLUtils. Main purpose here is to ease rows deserialization.
Current ColumnType
to java type mapping is following:
Integer: ColumnType.TINY
, ColumnType.SHORT
, ColumnType.LONG
, ColumnType.INT24
,
ColumnType.YEAR
, ColumnType.ENUM
, ColumnType.SET
,
Long: ColumnType.LONGLONG
,
Float: ColumnType.FLOAT
,
Double: ColumnType.DOUBLE
,
String: ColumnType.VARCHAR
, ColumnType.VAR_STRING
, ColumnType.STRING
,
java.util.BitSet: ColumnType.BIT
,
java.util.Date: ColumnType.DATETIME
, ColumnType.DATETIME_V2
,
java.math.BigDecimal: ColumnType.NEWDECIMAL
,
java.sql.Timestamp: ColumnType.TIMESTAMP
, ColumnType.TIMESTAMP_V2
,
java.sql.Date: ColumnType.DATE
,
java.sql.Time: ColumnType.TIME
, ColumnType.TIME_V2
,
byte[]: ColumnType.BLOB
,
At the moment ColumnType.GEOMETRY
is unsupported.
- Author:
- Stanley Shyiko
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRowsEventDataDeserializer
public AbstractRowsEventDataDeserializer(Map<Long,TableMapEventData> tableMapEventByTableId)
deserializeRow
protected Serializable[] deserializeRow(long tableId,
BitSet includedColumns,
ByteArrayInputStream inputStream)
throws IOException
- Throws:
IOException
Copyright © 2014. All Rights Reserved.