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 |
costs(IndexToken token)
Returns a cost estimation for searching the specified token.
|
boolean |
drop()
Drops the index.
|
EntryIterator |
entries(IndexEntries entries)
Returns all entries that match the specified token.
|
int |
index(byte[] name,
byte[] value,
boolean stat)
Indexes a name and returns its unique id.
|
void |
index(int name,
byte[] value)
Adds a value to the statistics of the specified key.
|
byte[] |
info(MainOptions options)
Returns information on the index structure.
|
void |
init()
Initializes the index.
|
IndexIterator |
iter(IndexToken token)
Returns an iterator for the index results.
|
protected void |
rehash(int s)
Rehashes all entries.
|
Stats |
stat(int id)
Returns the statistics for the specified key id.
|
void |
write(DataOutput out)
Writes the data structure to the specified output.
|
public Names(MetaData md)
md
- meta datapublic Names(DataInput in, MetaData md) throws IOException
in
- input streammd
- meta dataIOException
- I/O exceptionpublic void init()
Index
public int index(byte[] name, byte[] value, boolean stat)
name
- name to be addedvalue
- value, added to statisticsstat
- statistics flagpublic void index(int name, byte[] value)
name
- name idvalue
- value, added to statisticspublic void write(DataOutput out) throws IOException
TokenSet
write
in class TokenSet
out
- output streamIOException
- I/O exceptionpublic Stats stat(int id)
id
- idpublic byte[] info(MainOptions options)
Index
public EntryIterator entries(IndexEntries entries)
Index
protected void rehash(int s)
ASet
public void close()
Index
public boolean drop()
Index
public IndexIterator iter(IndexToken token)
Index
public int costs(IndexToken token)
Index
Copyright © 2005–2015 BaseX Team. All rights reserved.