com.continuent.tungsten.replicator.thl
Class THLEvent

java.lang.Object
  extended by com.continuent.tungsten.replicator.thl.THLEvent
All Implemented Interfaces:
java.io.Serializable

public class THLEvent
extends java.lang.Object
implements java.io.Serializable

This class defines a THLEvent

Version:
1.0
Author:
Teemu Ollakka
See Also:
Serialized Form

Field Summary
static short HEARTBEAT_EVENT
          Heartbeat event
static short REPL_DBMS_EVENT
          Event carrying DBMS event information
static short START_MASTER_EVENT
          This event is created each time node gets into master state
static short STOP_MASTER_EVENT
          This event is created each time master node exits master state gracefully
 
Constructor Summary
THLEvent(long seqno, short fragno, boolean lastFrag, java.lang.String sourceId, short type, long epochNumber, java.sql.Timestamp localEnqueueTstamp, java.sql.Timestamp sourceTstamp, java.lang.String eventId, java.lang.String shardId, ReplEvent event)
          Creates a new THLEvent object
THLEvent(java.lang.String eventId, ReplDBMSEvent event)
          Creates a new THLEvent object with status set to COMPLETED.
 
Method Summary
 java.lang.String getComment()
          Get event comment.
 long getEpochNumber()
          Get event epoch number.
 java.lang.String getEventId()
          Get event identifier.
 short getFragno()
          Get event fragment number.
 boolean getLastFrag()
          Get last fragment flag.
 java.sql.Timestamp getLocalEnqueueTstamp()
          Get local enqueue timestamp.
 ReplEvent getReplEvent()
          Get associated replication.
 long getSeqno()
          Get event sequence number.
 java.lang.String getShardId()
          Returns the shard ID.
 java.lang.String getSourceId()
          Get source identifier.
 java.sql.Timestamp getSourceTstamp()
          Get source timestamp.
 short getType()
          Get event type.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REPL_DBMS_EVENT

public static final short REPL_DBMS_EVENT
Event carrying DBMS event information

See Also:
Constant Field Values

START_MASTER_EVENT

public static final short START_MASTER_EVENT
This event is created each time node gets into master state

See Also:
Constant Field Values

STOP_MASTER_EVENT

public static final short STOP_MASTER_EVENT
This event is created each time master node exits master state gracefully

See Also:
Constant Field Values

HEARTBEAT_EVENT

public static final short HEARTBEAT_EVENT
Heartbeat event

See Also:
Constant Field Values
Constructor Detail

THLEvent

public THLEvent(java.lang.String eventId,
                ReplDBMSEvent event)
Creates a new THLEvent object with status set to COMPLETED.

Parameters:
eventId - Event identifier
event - ReplDBMSEvent

THLEvent

public THLEvent(long seqno,
                short fragno,
                boolean lastFrag,
                java.lang.String sourceId,
                short type,
                long epochNumber,
                java.sql.Timestamp localEnqueueTstamp,
                java.sql.Timestamp sourceTstamp,
                java.lang.String eventId,
                java.lang.String shardId,
                ReplEvent event)
Creates a new THLEvent object

Parameters:
seqno - Sequence number
fragno - Fragment number
lastFrag - Last fragment flag
sourceId - Source identifier
type - Event type
localEnqueueTstamp - Local enqueue timestamp
sourceTstamp - Source timestamp
eventId - Event identifier
shardId - Shard ID of this transaction
event - Event
Method Detail

getSeqno

public long getSeqno()
Get event sequence number.

Returns:
Sequence number

getFragno

public short getFragno()
Get event fragment number.

Returns:
Fragment number

getLastFrag

public boolean getLastFrag()
Get last fragment flag.

Returns:
Last fragment flag

getSourceId

public java.lang.String getSourceId()
Get source identifier.

Returns:
Source identifier

getType

public short getType()
Get event type.

Returns:
Event type

getEpochNumber

public long getEpochNumber()
Get event epoch number.

Returns:
Epoch number

getLocalEnqueueTstamp

public java.sql.Timestamp getLocalEnqueueTstamp()
Get local enqueue timestamp.

Returns:
Local enqueue timestamp

getSourceTstamp

public java.sql.Timestamp getSourceTstamp()
Get source timestamp.

Returns:
Source timestamp

getComment

public java.lang.String getComment()
Get event comment.

Returns:
Comment

getEventId

public java.lang.String getEventId()
Get event identifier.

Returns:
event's id

getShardId

public java.lang.String getShardId()
Returns the shard ID.


getReplEvent

public ReplEvent getReplEvent()
Get associated replication.

Returns:
associated ReplEvent

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()