public class AggrTable extends AggregatorModule
config, logger
Constructor and Description |
---|
AggrTable(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
|
NAR |
get(NARKey key)
Gets a NAR from the table according to the given key.
|
protected void |
getConfigData()
This method should obtain the necessary information from the
config class, in order to configure the module.
|
boolean |
isHealthy() |
java.util.Enumeration |
keys()
Keys of all the records in the table
|
void |
open()
Opens the table.
|
void |
put(NARKey key,
NAR record)
Puts a NAR into the table, according to the given key.
|
int[] |
recordInitFields()
Returns the fields needed by a new record, where those fields
are managed by this object.
|
NAR |
remove(NARKey key)
Removes a NAR from the table, and returns the element at the
key.
|
void |
shutdown()
Shuts down this object.
|
protected void getConfigData()
AggregatorModule
getConfigData
in class AggregatorModule
public void open()
public void close()
public int[] recordInitFields()
recordInitFields
in class AggregatorModule
public void shutdown()
shutdown
in class AggregatorModule
public NAR get(NARKey key)
key
- Key of the NAR in the tablepublic void put(NARKey key, NAR record)
key
- Index of the NARrecord
- NAR to putpublic NAR remove(NARKey key)
key
- Key of the record to remove
ggerIfc.SF_RES_ERR_ENT_CREATEpublic java.util.Enumeration keys()
public boolean containsKey(NARKey key)
key
- Key to look forpublic boolean isHealthy()