public class DuplicateKeyTable
extends java.lang.Object
Constructor and Description |
---|
DuplicateKeyTable(ConfigIfc config,
LoggerIfc logger,
Factory factory,
java.io.File scratchDir)
Creates the base object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the table
|
boolean |
containsKey(NARKey key)
Returns whether a given key exists in the table
|
boolean |
containsKey(java.lang.Object key) |
NARKey |
get(NARKey key)
Gets a NAR from the table according to the given key.
|
java.lang.Object |
get(java.lang.Object key) |
protected void |
getConfigData() |
boolean |
isEmpty()
Returns whether the table is empty.
|
boolean |
isHealthy() |
java.util.Enumeration |
keys()
Returns an Enumeration of keys.
|
void |
open()
Opens the table.
|
void |
put(NARKey key,
NARKey record)
Puts a NAR into the table, according to the given key.
|
NARKey |
remove(NARKey key)
Removes a NAR from the table, and returns the element at the
key.
|
java.lang.Object |
remove(java.lang.Object key) |
int |
size()
Returns the size of the table.
|
protected void getConfigData()
public void open()
public void close()
public boolean containsKey(NARKey key)
key
- Key to look forpublic boolean containsKey(java.lang.Object key)
public NARKey get(NARKey key)
key
- Key of the NAR in the tablepublic java.lang.Object get(java.lang.Object key)
public boolean isEmpty()
public java.util.Enumeration keys()
public void put(NARKey key, NARKey record)
key
- Index of the NARrecord
- NAR to putpublic NARKey remove(NARKey key)
key
- Key of the record to removepublic java.lang.Object remove(java.lang.Object key)
public int size()
public boolean isHealthy()