All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.shyiko.mysql.binlog.event.deserialization.MariadbGtidEventDataDeserializer Maven / Gradle / Ivy

The newest version!
package com.github.shyiko.mysql.binlog.event.deserialization;

import com.github.shyiko.mysql.binlog.event.MariadbGtidEventData;
import com.github.shyiko.mysql.binlog.io.ByteArrayInputStream;

import java.io.IOException;

/**
 * Mariadb GTID_EVENT Fields
 * 
 *     uint8 GTID sequence
 *     uint4 Replication Domain ID
 *     uint1 Flags
 *
 * 	if flag & FL_GROUP_COMMIT_ID
 * 	    uint8 commit_id
 * 	else
 * 	    uint6 0
 * 
* * @author Winger * @see GTID_EVENT for the original doc */ public class MariadbGtidEventDataDeserializer implements EventDataDeserializer { @Override public MariadbGtidEventData deserialize(ByteArrayInputStream inputStream) throws IOException { MariadbGtidEventData event = new MariadbGtidEventData(); event.setSequence(inputStream.readLong(8)); event.setDomainId(inputStream.readInteger(4)); event.setFlags(inputStream.readInteger(1)); // Flags ignore return event; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy