com.continuent.tungsten.replicator.consistency
Class ConsistencyCheckAbstract
java.lang.Object
com.continuent.tungsten.replicator.consistency.ConsistencyCheckAbstract
- All Implemented Interfaces:
- ConsistencyCheck, java.io.Serializable
- Direct Known Subclasses:
- ConsistencyCheckMD5
public abstract class ConsistencyCheckAbstract
- extends java.lang.Object
- implements ConsistencyCheck
This class defines a ConsistencyCheckAbstract
- Version:
- 1.0
- Author:
- Alex Yurchenko
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
id
protected int id
table
protected Table table
method
protected java.lang.String method
ConsistencyCheckAbstract
protected ConsistencyCheckAbstract(int id,
Table table,
java.lang.String method)
getCheckId
public final int getCheckId()
-
- Specified by:
getCheckId in interface ConsistencyCheck
- Returns:
- consistency check ID
- See Also:
ConsistencyCheck.getCheckId()
getSchemaName
public final java.lang.String getSchemaName()
-
- Specified by:
getSchemaName in interface ConsistencyCheck
- Returns:
- schema of the checked table
- See Also:
ConsistencyCheck.getSchemaName()
getTableName
public final java.lang.String getTableName()
-
- Specified by:
getTableName in interface ConsistencyCheck
- Returns:
- name of the checked table
- See Also:
ConsistencyCheck.getTableName()
getRowOffset
public int getRowOffset()
-
- Specified by:
getRowOffset in interface ConsistencyCheck
- Returns:
- offset of the row the check starts with. 1st row has offset 0.
Rows counted as sorted by primary key or by all columns if
there's no primary key.
- See Also:
ConsistencyCheck.getRowOffset()
getRowLimit
public int getRowLimit()
-
- Specified by:
getRowLimit in interface ConsistencyCheck
- Returns:
- how many rows to check
- See Also:
ConsistencyCheck.getRowLimit()
getMethod
public final java.lang.String getMethod()
-
- Specified by:
getMethod in interface ConsistencyCheck
- Returns:
- String representation of a consistency check method
- See Also:
ConsistencyCheck.getMethod()
performConsistencyCheck
public abstract java.sql.ResultSet performConsistencyCheck(Database conn)
throws ConsistencyException
-
- Specified by:
performConsistencyCheck in interface ConsistencyCheck
- Returns:
- ResultSet should contain at least two values: int 'this_cnt' and
char[] 'this_crc'.
- Throws:
ConsistencyException- See Also:
ConsistencyCheck.performConsistencyCheck(com.continuent.tungsten.replicator.database.Database)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
serialize
public byte[] serialize()
throws ConsistencyException
- Throws:
ConsistencyException
deserialize
public static ConsistencyCheck deserialize(byte[] bytes)
throws ConsistencyException
- Throws:
ConsistencyException