| Modifier and Type | Field and Description |
|---|---|
protected Stats[] |
stats
Statistical information.
|
| Constructor and Description |
|---|
Names(DataInput in,
MetaData md)
Constructor, specifying an input file.
|
Names(MetaData md)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the index.
|
int |
count(IndexToken token)
Returns the (approximate/estimated) number of hits for the specified token.
|
EntryIterator |
entries(byte[] prefix)
Returns all entries that start with the specified prefix.
|
int |
index(byte[] n,
byte[] v,
boolean st)
Indexes a name and returns its unique id.
|
void |
index(int n,
byte[] v)
Adds a value to the statistics of the specified key.
|
byte[] |
info()
Returns information on the index structure.
|
void |
init()
Initializes the statistics.
|
IndexIterator |
iter(IndexToken token)
Returns an iterator for the index results.
|
protected void |
rehash()
Resizes the hash table.
|
Stats |
stat(int id)
Returns the statistics for the specified key id.
|
void |
write(DataOutput out)
Writes the token set to the specified output.
|
protected Stats[] stats
public Names(MetaData md)
md - meta datapublic void init()
public int index(byte[] n,
byte[] v,
boolean st)
n - name to be addedv - value, added to statisticsst - statistics flagpublic void index(int n,
byte[] v)
n - name idv - value, added to statisticspublic void write(DataOutput out) throws java.io.IOException
TokenSetpublic Stats stat(int id)
id - idpublic byte[] info()
Indexpublic EntryIterator entries(byte[] prefix)
Indexprotected void rehash()
TokenSetpublic void close()
Indexpublic IndexIterator iter(IndexToken token)
Indexpublic int count(IndexToken token)
Index