neustore.base
Interface Key

All Superinterfaces:
java.lang.Comparable<Key>
All Known Implementing Classes:
IntKey

public interface Key
extends java.lang.Comparable<Key>

Interface for the key part of a record.

Author:
Tian Xia <tianxia@ccs.neu.edu>
Donghui Zhang <donghui@ccs.neu.edu>
See Also:
Data

Method Summary
 java.lang.Object clone()
          Creates a new copy of the object.
 int maxSize()
          Returns the maximum number of bytes this type of object may occupy.
 void read(java.io.DataInputStream in)
          Reads the object from an input stream.
 int size()
           
 void write(java.io.DataOutputStream out)
          Writes the object to an output stream.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

clone

java.lang.Object clone()
Creates a new copy of the object.

Returns:
the new copy

size

int size()

maxSize

int maxSize()
Returns the maximum number of bytes this type of object may occupy. It is used to support variable-length key.

Returns:
maximum number of bytes

read

void read(java.io.DataInputStream in)
          throws java.io.IOException
Reads the object from an input stream.

Parameters:
in - input stream
Throws:
java.io.IOException

write

void write(java.io.DataOutputStream out)
           throws java.io.IOException
Writes the object to an output stream.

Parameters:
out - output stream
Throws:
java.io.IOException