public final class LogHeader extends Object
| Name | Format | Description |
|---|---|---|
| timestamp | 4 byte unsigned integer | The time when the query started, in seconds since 1970. |
| type | 1 byte enumeration | See enum #Log_event_type. |
| server_id | 4 byte unsigned integer | Server ID of the server that created the event. |
| total_size | 4 byte unsigned integer | The total size of this event, in bytes. In other words, this is the sum of the sizes of Common-Header, Post-Header, and Body. |
| master_position | 4 byte unsigned integer | The position of the next event in the master binary log, in bytes from the beginning of the file. In a binlog that is not a relay log, this is just the position of the next event, in bytes from the beginning of the file. In a relay log, this is the position of the next event in the master's binlog. |
| flags | 2 byte bitfield | See Log_event::flags. |
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
checksumAlg
The value is set by caller of FD constructor and
Log_event::write_header() for the rest.
|
protected long |
crc
Placeholder for event checksum while writing to binlog.
|
protected int |
eventLen
Number of bytes written by write() function
|
protected int |
flags
Some 16 flags.
|
protected long |
logPos
The offset in the log where this event originally appeared (it is
preserved in relay logs, making SHOW SLAVE STATUS able to print
coordinates of the event in the master's binlog).
|
protected long |
serverId
The master's server id (is preserved in the relay log; used to prevent
from infinite loops in circular replication).
|
protected int |
type |
protected long |
when
Timestamp on the master(for debugging and replication of
NOW()/TIMESTAMP).
|
| 构造器和说明 |
|---|
LogHeader(int type) |
LogHeader(LogBuffer buffer,
FormatDescriptionLogEvent descriptionEvent) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getChecksumAlg() |
long |
getCrc() |
int |
getEventLen()
The total size of this event, in bytes.
|
int |
getFlags()
Some 16 flags.
|
long |
getLogPos()
The position of the next event in the master binary log, in bytes from
the beginning of the file.
|
long |
getServerId()
Server ID of the server that created the event.
|
int |
getType()
The different types of log events.
|
long |
getWhen()
The time when the query started, in seconds since 1970.
|
protected final int type
protected long logPos
protected long when
protected int eventLen
protected long serverId
protected int flags
protected int checksumAlg
protected long crc
public LogHeader(int type)
public LogHeader(LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent)
public final int getType()
public final long getLogPos()
public final int getEventLen()
public final long getWhen()
public final long getServerId()
public final int getFlags()
public long getCrc()
public int getChecksumAlg()
Copyright © 2017. All rights reserved.