Package edu.caltech.nanodb.storage
Interface HashedTupleFile
-
- All Superinterfaces:
TupleFile
public interface HashedTupleFile extends TupleFile
This interface extends theTupleFile
interface, adding operations that can be provided on files of tuples that are hashed on a specific key. The key used to hash tuples is returned by thegetKeySpec()
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tuple
findFirstTupleEquals(Tuple hashKey)
Returns the first tuple in the file that has the same hash-key values, ornull
if there are no tuples with this hash-key value in the tuple file.Tuple
findNextTupleEquals(Tuple prevTuple)
Returns the next entry in the index that has the same hash-key value, ornull
if there are no more entries with this hash-key value in the tuple file.java.util.List<Expression>
getKeySpec()
Returns the column(s) that comprise the hash key in this tuple file.-
Methods inherited from interface edu.caltech.nanodb.storage.TupleFile
addTuple, analyze, deleteTuple, getDBFile, getFirstTuple, getManager, getNextTuple, getSchema, getStats, getTuple, optimize, updateTuple, verify
-
-
-
-
Method Detail
-
getKeySpec
java.util.List<Expression> getKeySpec()
Returns the column(s) that comprise the hash key in this tuple file.- Returns:
- the column(s) that comprise the hash key in this tuple file.
-
findFirstTupleEquals
Tuple findFirstTupleEquals(Tuple hashKey)
Returns the first tuple in the file that has the same hash-key values, ornull
if there are no tuples with this hash-key value in the tuple file.- Parameters:
hashKey
- the tuple to search for- Returns:
- The first tuple in the file with the same hash-key values, or
null
if the file contains no files with the specified search key value. This tuple will actually be backed by the tuple file, so typically it will be a subclass ofPageTuple
.
-
findNextTupleEquals
Tuple findNextTupleEquals(Tuple prevTuple)
Returns the next entry in the index that has the same hash-key value, ornull
if there are no more entries with this hash-key value in the tuple file.- Parameters:
prevTuple
- The tuple from which to resume the search for the next tuple with the same hash-key values. This should be a tuple returned by a previous call tofindFirstTupleEquals(edu.caltech.nanodb.relations.Tuple)
orfindNextTupleEquals(edu.caltech.nanodb.relations.Tuple)
; using any other tuple would be an error.- Returns:
- The next tuple in the file with the same hash-key values, or
null
if there are no more entries with this hash-key value in the file.
-
-