|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.thl.CommitSeqnoTable
public class CommitSeqnoTable
Encapsulates definition and management of the trep_commit_seqno table, which is used to ensure consistency between the current contents of the history table and the actual database. Here are the rules for master and slave:
| Field Summary | |
|---|---|
static java.lang.String |
TABLE_NAME
|
| Constructor Summary | |
|---|---|
CommitSeqnoTable(Database database,
java.lang.String schema,
java.lang.String tableType,
boolean syncNativeSlaveRequired)
Creates a new instance valid for life of the provided database connection. |
|
| Method Summary | |
|---|---|
int |
count()
Returns the count of rows in the trep_commit_seqno table. |
void |
expandTasks(int channels)
Copies the single task 0 row left by a clean offline operation to add rows for each task in multi-channel operation. |
void |
initializeTable(int channels)
Create the trep_commit_seqno table, if necessary, and ensure the number of channels matches the number of channels. |
ReplDBMSHeader |
lastCommitSeqno(int taskId)
Fetches header data for last committed transaction or null if none such can be found. |
ReplDBMSHeader |
minCommitSeqno()
Returns the header for the lowest committed sequence number or null if none such can be found. |
void |
prepare(int taskId)
Prepares the instance for use. |
boolean |
reduceTasks(Database conn,
int channels)
Reduces the trep_commit_seqno table to task 0 entry *provided* there is a task 0 row and provide all rows are at the same sequence number. |
void |
release()
Releases the instance. |
void |
updateLastCommitSeqno(int taskId,
ReplDBMSHeader header,
long appliedLatency)
Updates the last commit seqno value. |
void |
validate(int channels)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TABLE_NAME
| Constructor Detail |
|---|
public CommitSeqnoTable(Database database,
java.lang.String schema,
java.lang.String tableType,
boolean syncNativeSlaveRequired)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public void initializeTable(int channels)
throws java.sql.SQLException,
ReplicatorException
channels - Number of channels in the pipeline
java.sql.SQLException
ReplicatorException
public void prepare(int taskId)
throws java.sql.SQLException,
ReplicatorException
ReplicatorException - Thrown if we don't have a row for this entry
java.sql.SQLExceptionpublic void release()
public ReplDBMSHeader lastCommitSeqno(int taskId)
throws java.sql.SQLException
java.sql.SQLException
public ReplDBMSHeader minCommitSeqno()
throws java.sql.SQLException
java.sql.SQLException
public void expandTasks(int channels)
throws java.sql.SQLException,
ReplicatorException
ReplicatorException - Thrown if the task ID 0 does not exist
java.sql.SQLException
public boolean reduceTasks(Database conn,
int channels)
throws java.sql.SQLException
java.sql.SQLException
public void updateLastCommitSeqno(int taskId,
ReplDBMSHeader header,
long appliedLatency)
throws java.sql.SQLException
java.sql.SQLException
public int count()
throws java.sql.SQLException
java.sql.SQLException
public void validate(int channels)
throws java.sql.SQLException,
ReplicatorException
java.sql.SQLException
ReplicatorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||