public class TableFlush extends AggregatorModule
config, logger
Constructor and Description |
---|
TableFlush(ConfigIfc config,
LoggerIfc logger,
AggrTable table,
DCStreamHandler streamHandler,
java.lang.String nodeID,
int nodeType) |
Modifier and Type | Method and Description |
---|---|
void |
completeFlush()
Flushes the complete table.
|
void |
flushRecord(NAR nar)
Flushes the given record to the next node.
|
void |
flushRecordAndRemove(NAR nar,
NARKey key)
Flushes the given record to the next node, and removes
all traces of it from the table.
|
void |
flushRecords(NAR[] nars)
Flushes the given set of records to the next node.
|
void |
flushTableRecord(NARKey key)
Flushes the given record to the next node, after removing it from
the table.
|
void |
flushTableRecords(NARKey[] keys)
Flushes the set of records to the next node, after removing it from
the table.
|
protected void |
getConfigData()
This method should obtain the necessary information from the
config class, in order to configure the module.
|
void |
initialFlush()
Flushes the table based on whether the "FlushOnStartup"
configuration setting is set to true.
|
int[] |
recordInitFields()
Returns the fields that should be stored in a newly created
record entry.
|
void |
shutdown()
This method should handle shutting down the routines that have been
started by this class.
|
public TableFlush(ConfigIfc config, LoggerIfc logger, AggrTable table, DCStreamHandler streamHandler, java.lang.String nodeID, int nodeType)
public int[] recordInitFields()
recordInitFields
in class AggregatorModule
public void shutdown()
AggregatorModule
shutdown
in class AggregatorModule
public void flushRecord(NAR nar)
nar
- NAR to flush to the next nodepublic void flushRecordAndRemove(NAR nar, NARKey key)
nar
- Record to flush to next nodekey
- Key of element to remove from table
(but NOT flush to next node)public void flushRecords(NAR[] nars)
nars
- NARs to flush to the next nodepublic void flushTableRecord(NARKey key)
key
- key of the NAR in the tablepublic void flushTableRecords(NARKey[] keys)
keys
- keys of the NARs in the tablepublic void initialFlush()
public void completeFlush()
protected void getConfigData()
AggregatorModule
getConfigData
in class AggregatorModule