com.continuent.tungsten.replicator.event
Class ReplControlEvent

java.lang.Object
  extended by com.continuent.tungsten.replicator.event.ReplEvent
      extended by com.continuent.tungsten.replicator.event.ReplControlEvent
All Implemented Interfaces:
java.io.Serializable

public class ReplControlEvent
extends ReplEvent

An implementation of ReplEvent used to transmit control information within pipelines. Control events add extra information that affects the disposition of processing following a particular event. They are not serialized and should never be handled by an applier.

Version:
1.0
Author:
Robert Hodges
See Also:
Serialized Form

Field Summary
static int STOP
          Event indicates end of processing.
static int SYNC
          Event is provided for synchronization purposes when waiting for a particular sequence number or event.
 
Constructor Summary
ReplControlEvent(int eventType, long seqno, ReplDBMSHeader header)
          Creates a new control event instance.
 
Method Summary
 int getEventType()
          Returns the control event type.
 ReplDBMSHeader getHeader()
          Returns the event to which control information applies or null if inapplicable.
 long getSeqno()
          Returns the sequence number of this event.
 
Methods inherited from class com.continuent.tungsten.replicator.event.ReplEvent
getEstimatedSize, setEstimatedSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STOP

public static final int STOP
Event indicates end of processing. Task should immediately commit current work and exit.

See Also:
Constant Field Values

SYNC

public static final int SYNC
Event is provided for synchronization purposes when waiting for a particular sequence number or event. Synchronization events ensure that all tasks "see" an event on which we are waiting when parallel apply is active.

See Also:
Constant Field Values
Constructor Detail

ReplControlEvent

public ReplControlEvent(int eventType,
                        long seqno,
                        ReplDBMSHeader header)
Creates a new control event instance.

Parameters:
eventType - A static control event type
Method Detail

getEventType

public int getEventType()
Returns the control event type.


getHeader

public ReplDBMSHeader getHeader()
Returns the event to which control information applies or null if inapplicable.


getSeqno

public long getSeqno()
Returns the sequence number of this event.

Specified by:
getSeqno in class ReplEvent
See Also:
ReplEvent.getSeqno()