public class FlexibleAggregatorFieldProcessor extends NPLFieldProcessor
Modifier and Type | Field and Description |
---|---|
protected DiscardedStatisticsMonitorIfc |
discardedCounts |
protected FlexibleAggrKeyFactory[] |
keyFactoryArray |
protected FieldKey |
mapChangeTime |
protected FieldKey |
mapDownlinkVolume |
protected FieldKey |
mapUplinkVolume |
protected FlexibleNARKey[] |
narKeyArray |
protected static int |
NODE_TYPE |
protected FlexibleAggrTable[] |
tableArray |
protected FlexibleTableFlush[] |
tableFlushArray |
protected FlexibleTimerFlush[] |
timerFlushArray |
static int |
TS_DAY |
static int |
TS_HOUR |
static int |
TS_MINUTE |
static int |
TS_MONTH |
static int |
TS_OFFSET_HOUR |
static int |
TS_OFFSET_MINUTE |
static int |
TS_SECOND |
static int |
TS_SIGN |
static int |
TS_YEAR
Indices into the TimeStamp byte[].
|
currentState, currentTransactionId, fileLevelTransaction, freezeHelper, nplProgram, waitForInputLock
Constructor and Description |
---|
FlexibleAggregatorFieldProcessor(java.lang.Class outputDataType,
FlexibleAggregatorNode node,
java.lang.String scratchDir,
java.lang.String fileName,
IDCMethodHandler methodHandler) |
Modifier and Type | Method and Description |
---|---|
boolean |
compareBytes(DCFieldContainer narA,
DCFieldContainer narB,
FieldKey attrId)
Performs a simple byte comparison on the attribute in the two NARs.
|
FlexibleNARKey |
createKey(int index,
NAR nar)
This will generate and return a key based on the record.
|
boolean |
distributeTrafficVolumesPerDay(ListField trafficVolumes,
NAR destContainer,
java.util.List uplinkVolumeAttrs,
java.util.List downlinkVolumeAttrs,
ListField unprocessedVolumes,
BytesField openingTime)
This will distribute the traffic volume uplink and downlink volumes into
appropriate daily bins according to the individual times.
|
byte[] |
generateOpeningTimeFromTrafficVolume(java.util.List trafficVolumes)
Will return the integer day of year corresponding to the first traffic volume.
|
boolean |
getAndRemoveNAR(NAR nar,
int index)
This will remove the NAR entry from the table.
|
int |
getCount(long tempKey,
long tempKey1,
long tempKey2,
int index)
Gets the Count
|
boolean |
getNARKeepTimer(NAR nar,
int index)
This will remove a NAR but leave its timer.
|
protected void |
init() |
void |
isAllKeyAttributesExists(NAR nar,
int tableNumber) |
int |
populateIndividualTrafficVolume(java.util.Map trafficVolumeMap,
DCFieldContainer destContainer,
java.util.List uplinkVolumeIDs,
java.util.List downlinkVolumeIDs,
BytesField nextOpeningTime,
int dayOfYearCheck)
Will only populate the traffic volumes if they are for the same day as dayOfYearCheck,
unless dayOfYearCheck < 1.
|
void |
printTimer(NAR nar,
int index)
To be used in debugging only.
|
void |
removeDeactivatedTimer(int index)
This will remove a deactivated timer.
|
boolean |
removeNAR(int index)
This will remove a NAR entry from the table without returning
the removed entry.
|
boolean |
removeNARTimer(NAR nar,
int index)
This will remove the timer for a NAR from the timer table.
|
void |
reset(long cleanup)
Reset the Count
|
void |
resetCount(long tempKey,
long tempKey1,
long tempKey2,
int index) |
void |
setCount(long tempKey,
long tempKey1,
long tempKey2,
int index)
Sets the Count
|
void |
shutdown()
Performs all steps necessary to gracefully stop this FieldProcessor.
|
void |
storeNAR(NAR nar,
int index,
boolean setTimer)
This will generate a key and store the NAR in the table.
|
void |
storeNARReusingTimer(NAR nar,
int index)
This will generate a key and store the NAR in the table with an old timer.
|
dataIsAvailable, freezeState, getBulkData, getConfigValue, getData, getExposedFields, getInputFields, getIntConfigValue, getLogger, getMethodHandler, getNPLFileName, getNPLProgram, getOutputFields, getPollForData, getSleepTime, handleProcessingException, handleProcessingException, handleProcessingException, handleRejectOfFile, isBulkProcessing, isDataAvailable, isFileLevelTransaction, isRejected, isRunning, isShutdown, isShutdownOnError, processData, processData, processData, processFileData, processFileData, run, setbulkIOConfig, setBulkProcessing, setDataReceiver, setMultiThreadConfig, setNPLFileName, setPollForData, setProcessingData, setRunning, setShutdown, setShutdownOnError, setSleepTime, setTransactionID, unfreezeState, writeToError, writeToError
fileDataIsAvailable, getCurrArchFile, getData, getDataProvider, getDataReceiver, getDiscardedCounter, getFileBulkData, getFileData, getFileDataProvider, getFileDataReceiver, getOutputType, getProcessedArchFile, isEndOfFile, isFileDataAvailable, isStartOfFile, openInputFile, processEndOfFileData, processRejectFile, processStartOfFileData, rejectFile, removeProcessedFile, setDataProvider, setDiscardedCounter, setFileDataProvider, setFileDataReceiver, setOutputType, setProcessedArchFile, signalBatchCompletion, validOIMinorType
protected static int NODE_TYPE
protected FlexibleAggrTable[] tableArray
protected FlexibleAggrKeyFactory[] keyFactoryArray
protected FlexibleTimerFlush[] timerFlushArray
protected FlexibleTableFlush[] tableFlushArray
protected FlexibleNARKey[] narKeyArray
protected FieldKey mapChangeTime
protected FieldKey mapUplinkVolume
protected FieldKey mapDownlinkVolume
protected DiscardedStatisticsMonitorIfc discardedCounts
public static final int TS_YEAR
public static final int TS_MONTH
public static final int TS_DAY
public static final int TS_HOUR
public static final int TS_MINUTE
public static final int TS_SECOND
public static final int TS_SIGN
public static final int TS_OFFSET_HOUR
public static final int TS_OFFSET_MINUTE
public FlexibleAggregatorFieldProcessor(java.lang.Class outputDataType, FlexibleAggregatorNode node, java.lang.String scratchDir, java.lang.String fileName, IDCMethodHandler methodHandler)
protected void init()
public void isAllKeyAttributesExists(NAR nar, int tableNumber)
public void shutdown()
NPLFieldProcessor
shutdown
in class NPLFieldProcessor
public FlexibleNARKey createKey(int index, NAR nar)
public void storeNAR(NAR nar, int index, boolean setTimer)
public void printTimer(NAR nar, int index)
public void storeNARReusingTimer(NAR nar, int index)
public boolean getNARKeepTimer(NAR nar, int index)
public boolean removeNARTimer(NAR nar, int index)
public boolean getAndRemoveNAR(NAR nar, int index)
public boolean removeNAR(int index)
public void setCount(long tempKey, long tempKey1, long tempKey2, int index)
public int getCount(long tempKey, long tempKey1, long tempKey2, int index)
public void reset(long cleanup)
public void resetCount(long tempKey, long tempKey1, long tempKey2, int index)
public void removeDeactivatedTimer(int index)
public boolean distributeTrafficVolumesPerDay(ListField trafficVolumes, NAR destContainer, java.util.List uplinkVolumeAttrs, java.util.List downlinkVolumeAttrs, ListField unprocessedVolumes, BytesField openingTime)
public int populateIndividualTrafficVolume(java.util.Map trafficVolumeMap, DCFieldContainer destContainer, java.util.List uplinkVolumeIDs, java.util.List downlinkVolumeIDs, BytesField nextOpeningTime, int dayOfYearCheck)
public byte[] generateOpeningTimeFromTrafficVolume(java.util.List trafficVolumes)
public boolean compareBytes(DCFieldContainer narA, DCFieldContainer narB, FieldKey attrId)