org.apache.cassandra.io
Class SSTable.KeyPositionInfo

java.lang.Object
  extended by org.apache.cassandra.io.SSTable.KeyPositionInfo
All Implemented Interfaces:
java.lang.Comparable<SSTable.KeyPositionInfo>
Enclosing class:
SSTable

public static class SSTable.KeyPositionInfo
extends java.lang.Object
implements java.lang.Comparable<SSTable.KeyPositionInfo>

This is a simple container for the index Key and its corresponding position in the data file. Binary search is performed on a list of these objects to lookup keys within the SSTable data file.


Constructor Summary
SSTable.KeyPositionInfo(java.lang.String decoratedKey, IPartitioner partitioner)
           
SSTable.KeyPositionInfo(java.lang.String decoratedKey, IPartitioner partitioner, long position)
           
 
Method Summary
 int compareTo(SSTable.KeyPositionInfo kPosInfo)
           
 java.lang.String key()
           
 long position()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SSTable.KeyPositionInfo

public SSTable.KeyPositionInfo(java.lang.String decoratedKey,
                               IPartitioner partitioner)

SSTable.KeyPositionInfo

public SSTable.KeyPositionInfo(java.lang.String decoratedKey,
                               IPartitioner partitioner,
                               long position)
Method Detail

key

public java.lang.String key()

position

public long position()

compareTo

public int compareTo(SSTable.KeyPositionInfo kPosInfo)
Specified by:
compareTo in interface java.lang.Comparable<SSTable.KeyPositionInfo>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 The Apache Software Foundation