com.continuent.tungsten.replicator.thl.log
Class LogIndexEntry

java.lang.Object
  extended by com.continuent.tungsten.replicator.thl.log.LogIndexEntry
All Implemented Interfaces:
java.lang.Comparable<LogIndexEntry>

public class LogIndexEntry
extends java.lang.Object
implements java.lang.Comparable<LogIndexEntry>

Implements a sortable index entry, where entries are sorted by sequence number.

Version:
1.0
Author:
Stephane Giron

Constructor Summary
LogIndexEntry(long startSeqno, long endSeqno, java.lang.String fileName)
          Creates a new IndexEntry object
 
Method Summary
 int compareTo(LogIndexEntry o)
          Implementation required for Comparable so that we can sort entries.
 boolean contains(long seqno)
          Returns true if the given seqno is in the file that this entry indexes.
 boolean hasSeqno(long seqno)
          Returns true if the index entry contains this sequence number.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogIndexEntry

public LogIndexEntry(long startSeqno,
                     long endSeqno,
                     java.lang.String fileName)
Creates a new IndexEntry object

Parameters:
startSeqno -
fileName -
Method Detail

hasSeqno

public boolean hasSeqno(long seqno)
Returns true if the index entry contains this sequence number.


compareTo

public int compareTo(LogIndexEntry o)
Implementation required for Comparable so that we can sort entries.

Specified by:
compareTo in interface java.lang.Comparable<LogIndexEntry>

contains

public boolean contains(long seqno)
Returns true if the given seqno is in the file that this entry indexes.


toString

public java.lang.String toString()

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