congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.github.shyiko.mysql.binlog.event
Code IndexAdd Tabnine to your IDE (free)

How to use com.github.shyiko.mysql.binlog.event

Best Java code snippets using com.github.shyiko.mysql.binlog.event (Showing top 20 results out of 315)

origin: zendesk/maxwell

public EventType getType() {
  return event.getHeader().getEventType();
}
origin: zendesk/maxwell

public Long getTableID() {
  EventData data = event.getData();
  switch ( event.getHeader().getEventType() ) {
    case EXT_WRITE_ROWS:
    case WRITE_ROWS:
      return ((WriteRowsEventData) data).getTableId();
    case EXT_UPDATE_ROWS:
    case UPDATE_ROWS:
      return ((UpdateRowsEventData) data).getTableId();
    case EXT_DELETE_ROWS:
    case DELETE_ROWS:
      return ((DeleteRowsEventData) data).getTableId();
    case TABLE_MAP:
      return ((TableMapEventData) data).getTableId();
  }
  return null;
}
origin: apache/nifi

  public InsertRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, WriteRowsEventData data) {
    super(tableInfo, INSERT_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows());
    this.data = data;
  }
}
origin: apache/rocketmq-externals

private void processTableMapEvent(Event event) {
  TableMapEventData data = event.getData();
  String dbName = data.getDatabase();
  String tableName = data.getTable();
  Long tableId = data.getTableId();
  Table table = schema.getTable(dbName, tableName);
  tableMap.put(tableId, table);
}
origin: apache/rocketmq-externals

private void processWriteEvent(Event event) {
  WriteRowsEventData data = event.getData();
  Long tableId = data.getTableId();
  List<Serializable[]> list = data.getRows();
  for (Serializable[] row : list) {
    addRow("WRITE", tableId, row);
  }
}
origin: apache/rocketmq-externals

private void processDeleteEvent(Event event) {
  DeleteRowsEventData data = event.getData();
  Long tableId = data.getTableId();
  List<Serializable[]> list = data.getRows();
  for (Serializable[] row : list) {
    addRow("DELETE", tableId, row);
  }
}
origin: apache/rocketmq-externals

private void processUpdateEvent(Event event) {
  UpdateRowsEventData data = event.getData();
  Long tableId = data.getTableId();
  List<Map.Entry<Serializable[], Serializable[]>> list = data.getRows();
  for (Map.Entry<Serializable[], Serializable[]> entry : list) {
    addRow("UPDATE", tableId, entry.getValue());
  }
}
origin: zendesk/maxwell

private void processQueryEvent(BinlogConnectorEvent event) throws Exception {
  QueryEventData data = event.queryData();
  processQueryEvent(
    data.getDatabase(),
    data.getSql(),
    this.schemaStore,
    Position.valueOf(event.getPosition(), getLastHeartbeatRead()),
    Position.valueOf(event.getNextPosition(), getLastHeartbeatRead()),
    event.getEvent().getHeader().getTimestamp()
  );
}
origin: zendesk/maxwell

public DeleteRowsEventData deleteRowsData() {
  return (DeleteRowsEventData) event.getData();
}
origin: zendesk/maxwell

public BinlogConnectorEvent(Event event, String filename, String gtidSetStr, String gtid, MaxwellOutputConfig outputConfig) {
  this.event = event;
  this.gtidSetStr = gtidSetStr;
  this.gtid = gtid;
  EventHeaderV4 hV4 = (EventHeaderV4) event.getHeader();
  this.nextPosition = new BinlogPosition(gtidSetStr, gtid, hV4.getNextPosition(), filename);
  this.position = new BinlogPosition(gtidSetStr, gtid, hV4.getPosition(), filename);
  this.outputConfig = outputConfig;
}
origin: debezium/debezium

/**
 * Blocks until the listener has seen the specified number of events with the given type, or until the specified time
 * has passed.
 * 
 * @param eventCount the number of events
 * @param type the type of event
 * @param timeoutMillis the maximum amount of time in milliseconds that this method should block
 * @throws TimeoutException if the waiting timed out before the expected number of events were received
 */
public void consume(int eventCount, EventType type, long timeoutMillis) throws TimeoutException {
  consume(eventCount, defaultTimeoutInMillis, event -> {
    EventHeader header = event.getHeader();
    EventType eventType = header == null ? null : header.getEventType();
    return type.equals(eventType);
  });
}
origin: apache/nifi

public UpdateRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, UpdateRowsEventData data) {
  super(tableInfo, UPDATE_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows());
  includedColumnsBeforeUpdate = data.getIncludedColumnsBeforeUpdate();
}
origin: apache/nifi

  public DeleteRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, DeleteRowsEventData data) {
    super(tableInfo, DELETE_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows());
  }
}
origin: shyiko/mysql-binlog-connector-java

public static boolean isRowMutation(EventType eventType) {
  return EventType.isWrite(eventType) ||
      EventType.isUpdate(eventType) ||
      EventType.isDelete(eventType);
}
origin: shyiko/mysql-binlog-connector-java

@Override
public long getDataLength() {
  return getEventLength() - getHeaderLength();
}
origin: zendesk/maxwell

public XidEventData xidData() {
  return (XidEventData) event.getData();
}
origin: zendesk/maxwell

public UpdateRowsEventData updateRowsData() {
  return (UpdateRowsEventData) event.getData();
}
origin: zendesk/maxwell

public WriteRowsEventData writeRowsData() {
  return (WriteRowsEventData) event.getData();
}
origin: zendesk/maxwell

public QueryEventData queryData() {
  return (QueryEventData) event.getData();
}
origin: zendesk/maxwell

public TableMapEventData tableMapData() {
  return (TableMapEventData) event.getData();
}
com.github.shyiko.mysql.binlog.event

Most used classes

  • WriteRowsEventData
  • Event
  • EventHeader
  • EventDeserializer
  • TableMapEventData
  • UpdateRowsEventData,
  • EventHeaderV4,
  • EventType,
  • QueryEventData,
  • RotateEventData,
  • NullEventDataDeserializer,
  • JsonBinary,
  • GtidEventDataDeserializer,
  • GtidEventData,
  • RowsQueryEventData,
  • XidEventData,
  • EventHeaderV4Deserializer,
  • FormatDescriptionEventDataDeserializer,
  • RotateEventDataDeserializer
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now