com.continuent.tungsten.replicator.util
Class SeqnoWatchPredicate

java.lang.Object
  extended by com.continuent.tungsten.replicator.util.SeqnoWatchPredicate
All Implemented Interfaces:
WatchPredicate<ReplDBMSHeader>

public class SeqnoWatchPredicate
extends java.lang.Object
implements WatchPredicate<ReplDBMSHeader>

Implements a WatchPredicate to identify that a particular sequence number has been reached. This returns true for any sequence number equal to or higher than the number we are seeking.

Version:
1.0
Author:
Robert Hodges

Constructor Summary
SeqnoWatchPredicate(long seqno)
           
 
Method Summary
 long getSeqno()
           
 boolean match(ReplDBMSHeader event)
          Return true if the sequence number is greater than or equal to what we are seeking.
 java.lang.String toString()
          Returns the class name and the seqno for which we waiting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SeqnoWatchPredicate

public SeqnoWatchPredicate(long seqno)
Method Detail

match

public boolean match(ReplDBMSHeader event)
Return true if the sequence number is greater than or equal to what we are seeking. Note: If the event is the same, we must ensure it is the last fragment.

Specified by:
match in interface WatchPredicate<ReplDBMSHeader>
See Also:
WatchPredicate.match(java.lang.Object)

getSeqno

public long getSeqno()

toString

public java.lang.String toString()
Returns the class name and the seqno for which we waiting.

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