net.neoremind.fountain.rowbaselog.event
类 FormatDescriptionEvent

java.lang.Object
  继承者 net.neoremind.fountain.event.BaseLogEvent
      继承者 net.neoremind.fountain.rowbaselog.event.FormatDescriptionEvent
所有已实现的接口:
Serializable

public class FormatDescriptionEvent
extends BaseLogEvent

binlog format描述事件,在v4版本的binlog文件中,第一个event就是FORMAT_DESCRIPTION_EVENT, 它描述了接下来其他的event是如何layed out的。

从以下版本开始:
2013-7-15
作者:
hanxu03, zhangxu
另请参见:
format-description-event, 序列化表格

字段摘要
 int binlogCreateTime
          4 bytes.
 int binlogVersion
          2 bytes.
 byte[] eventDataFixedPartLength
          (string.EOF) a array indexed by Binlog Event Type - 1 to extract the length of the event specific header.
 byte eventHeaderLength
          1 byte.
static int NORMAL_HEADER_LENGTH
           
 String serverVersion
          50 bytes.
 
构造方法摘要
FormatDescriptionEvent(BinlogEventHeader eventHeader, FormatInfoCallback callback)
           
 
方法摘要
 BaseLogEvent parseData(ByteBuffer buf)
          解析二进制数据填充event属性数据
 String toString()
           
 
从类 net.neoremind.fountain.event.BaseLogEvent 继承的方法
getEventHeader
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

NORMAL_HEADER_LENGTH

public static final int NORMAL_HEADER_LENGTH
另请参见:
常量字段值

binlogVersion

public int binlogVersion
2 bytes. The binary log format version. This is 4 in MySQL 5.0 and up.


serverVersion

public String serverVersion
50 bytes. The MySQL server's version (example: 5.0.14-debug-log), padded with 0x00 bytes on the right.


binlogCreateTime

public int binlogCreateTime
4 bytes. Timestamp in seconds when this event was created (this is the moment when the binary log was created). This value is redundant; the same value occurs in the timestamp header field.


eventHeaderLength

public byte eventHeaderLength
1 byte. The header length. This length - 19 gives the size of the extra headers field at the end of the header for other events.


eventDataFixedPartLength

public byte[] eventDataFixedPartLength
(string.EOF) a array indexed by Binlog Event Type - 1 to extract the length of the event specific header.

Variable-sized. An array that indicates the post-header lengths for all event types. There is one byte per event type that the server knows about.

event type header length这个字段,它保存了不同event的post-header长度, 实际是一个bitmap,这对每个event的type - 1就是对应的值的索引就存储了post header length

构造方法详细信息

FormatDescriptionEvent

public FormatDescriptionEvent(BinlogEventHeader eventHeader,
                              FormatInfoCallback callback)
方法详细信息

parseData

public BaseLogEvent parseData(ByteBuffer buf)
从类 BaseLogEvent 复制的描述
解析二进制数据填充event属性数据

指定者:
类 BaseLogEvent 中的 parseData

toString

public String toString()
覆盖:
类 Object 中的 toString


Copyright © 2016 neoremind. All rights reserved.