com.continuent.tungsten.replicator.extractor.mysql
Class RowsLogEvent

java.lang.Object
  extended by com.continuent.tungsten.replicator.extractor.mysql.LogEvent
      extended by com.continuent.tungsten.replicator.extractor.mysql.RowsLogEvent
Direct Known Subclasses:
DeleteRowsLogEvent, UpdateRowsLogEvent, WriteRowsLogEvent

public abstract class RowsLogEvent
extends LogEvent

Version:
1.0
Author:
Seppo Jaakola, Stephane Giron

Field Summary
protected  int bufferSize
           
protected  long columnsNumber
           
protected  FormatDescriptionLogEvent descriptionEvent
           
protected  byte[] packedRowsBuffer
           
protected  boolean useBytesForString
           
protected  java.util.BitSet usedColumns
           
protected  java.util.BitSet usedColumnsForUpdate
           
 
Fields inherited from class com.continuent.tungsten.replicator.extractor.mysql.LogEvent
execTime, flags, logPos, serverId, startPosition, threadSpecificEvent, type, when
 
Constructor Summary
RowsLogEvent(byte[] buffer, int eventLength, FormatDescriptionLogEvent descriptionEvent, int eventType, boolean useBytesForString)
           
 
Method Summary
protected  int extractValue(OneRowChange.ColumnSpec spec, OneRowChange.ColumnVal value, byte[] row, int rowPos, int type, int meta)
           
 int getEventSize()
           
 java.lang.String getForeignKeyChecksFlag()
          Returns the flagForeignKeyChecks value.
protected  long getTableId()
           
 java.lang.String getUniqueChecksFlag()
          Returns the flagUniqueChecks value.
abstract  void processExtractedEvent(RowChangeData rowChanges, TableMapLogEvent map)
           
protected  int processExtractedEventRow(OneRowChange oneRowChange, int rowIndex, java.util.BitSet cols, int rowPos, byte[] row, TableMapLogEvent map, boolean isKeySpec)
           
protected  java.lang.String processString(byte[] buffer, int pos, int length)
           
 
Methods inherited from class com.continuent.tungsten.replicator.extractor.mysql.LogEvent
doChecksum, extractDecimal, getDecimalBinarySize, getExecTime, getNextEventPosition, getType, getWhen, hexdump, hexdump, hexdump, readLogEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnsNumber

protected long columnsNumber

usedColumns

protected java.util.BitSet usedColumns

usedColumnsForUpdate

protected java.util.BitSet usedColumnsForUpdate

packedRowsBuffer

protected byte[] packedRowsBuffer

bufferSize

protected int bufferSize

useBytesForString

protected boolean useBytesForString

descriptionEvent

protected FormatDescriptionLogEvent descriptionEvent
Constructor Detail

RowsLogEvent

public RowsLogEvent(byte[] buffer,
                    int eventLength,
                    FormatDescriptionLogEvent descriptionEvent,
                    int eventType,
                    boolean useBytesForString)
             throws ReplicatorException
Throws:
ReplicatorException
Method Detail

processExtractedEvent

public abstract void processExtractedEvent(RowChangeData rowChanges,
                                           TableMapLogEvent map)
                                    throws ReplicatorException
Throws:
ReplicatorException

getEventSize

public int getEventSize()

extractValue

protected int extractValue(OneRowChange.ColumnSpec spec,
                           OneRowChange.ColumnVal value,
                           byte[] row,
                           int rowPos,
                           int type,
                           int meta)
                    throws java.io.IOException,
                           ReplicatorException
Throws:
java.io.IOException
ReplicatorException

getTableId

protected long getTableId()

processString

protected java.lang.String processString(byte[] buffer,
                                         int pos,
                                         int length)
                                  throws ReplicatorException
Throws:
ReplicatorException

processExtractedEventRow

protected int processExtractedEventRow(OneRowChange oneRowChange,
                                       int rowIndex,
                                       java.util.BitSet cols,
                                       int rowPos,
                                       byte[] row,
                                       TableMapLogEvent map,
                                       boolean isKeySpec)
                                throws ReplicatorException
Throws:
ReplicatorException

getForeignKeyChecksFlag

public java.lang.String getForeignKeyChecksFlag()
Returns the flagForeignKeyChecks value.

Returns:
Returns the flagForeignKeyChecks.

getUniqueChecksFlag

public java.lang.String getUniqueChecksFlag()
Returns the flagUniqueChecks value.

Returns:
Returns the flagUniqueChecks.