Package com.nt.udc.flexibleAggregator
Class FlexibleAggregatorHandler
java.lang.Object
com.nt.udc.flexibleAggregator.FlexibleAggregatorHandler
- All Implemented Interfaces:
IDCMethodHandler
This is the handler class for the enhancer aggregator. It provides
a comprehensive interface to all the aggregator functions through java
hooks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StoredStatisticsMonitorIfc
protected DuplicateStatisticsMonitorIfc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
appendLists
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will append the source list onto the end of the dest list.void
appendListsWithoutRepeat
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will append the source list onto the end of the dest list.compareBytes
(DCFieldContainer recA, DCFieldContainer recB, DCField attrId) This should be added to NPL at some point rather than using a specific java hook.void
concatenateStrings
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will concatenate the strings for each attribute listed with no separator.void
concatenateStrings
(DCFieldContainer source, DCFieldContainer dest, StringField separator, StringField attrList) This will concatenate the strings for each attribute listed, using the optional separator in between each.void
copyTrafficVolumeQoS
(DCFieldContainer mod, DCFieldContainer source, StringField name, StringField trafficVolumesName) distributeTrafficVolumeSetPerDay
(DCFieldContainer inContainer, StringField trafficVolumesID, DCFieldContainer destContainer, StringField uplinkSetName, StringField downlinkSetName, StringField openingTimeId) distributeTrafficVolumesPerDay
(DCFieldContainer inContainer, StringField trafficVolumesID, DCFieldContainer destContainer, StringField uplinkVolumeAttrs, StringField downlinkVolumeAttrs, StringField openingTimeId) This will distribute the traffic volume uplink and downlink volumes into appropriate daily bins according to the individual times.generateOpeningTimeFromTrafficVolume
(ListField trafficVolumes) Will return the day of the year for the first traffic volume.getBytesValueFromListMapIp
(ListField theList, IntField index, DCFieldContainer dest, StringField attrId) Function to return a specific element from a list type.getCount
(LongField tempKey, LongField tempKey1, LongField tempKey2, IntField index, IntField flushCount) Used for getting the count for a sessiongetDayOfYear
(BytesField bytesDate) This will return the day of the year as an integer.getNAR
(DCFieldContainer out) This will remove and return a NAR from the indicated table.getNAR
(DCFieldContainer out, IntField index) This will remove and return a NAR as the functions above, but the underlying timer will be stored to be reused with the same key.getNARSaveTimer
(DCFieldContainer out, IntField index) getPreviousDayOfYear
(BytesField bytesDate) This will return the previous day of the year as an integer.void
handleSequenceNumberConversion
(DCFieldContainer in, DCFieldContainer out, StringField name, StringField recordNumberListName, StringField resultName, StringField ipAddrName, StringField ipAddrSourceName) void
void
void
keepMaxAttributes
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will go through each of the attributes and keep the greater of the two.void
keepMinAttributes
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will go through each of the attributes and keep the smaller of the two.void
mapAttributes
(DCFieldContainer source, DCFieldContainer dest, StringField sourceAttrs, StringField destAttrs) This will perform various assignments.void
mapAttributeSets
(DCFieldContainer source, DCFieldContainer dest, StringField sourceSet, StringField destSet) void
printTimer
(DCFieldContainer in, IntField index) Useful for debugging.void
removeAttributes
(DCFieldContainer inContainer, StringField attributeIDs) This will remove all the indicated attributes from the given NAR.void
removeAttributeSet
(DCFieldContainer inContainer, StringField setName) This will remove all the indicated attributes from the given NAR.This will just remove an entry from the table.A nar removed from the table with getNarSaveTimer will still have a timer in the timer table.removeNARTimer
(DCFieldContainer nar, IntField index) void
This will remove a timer for an item removed with getNARSaveTimer.void
removeTimer
(IntField index) void
replaceAttributes
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will replace the specified attributes in the destination with those in the source.void
replaceAttributeSet
(DCFieldContainer source, DCFieldContainer dest, StringField attrSetName) This will replace the specified attributes in the destination with those in the source.void
replaceAttributeSetWithDelete
(DCFieldContainer source, DCFieldContainer dest, StringField attrSetName) This will replace the specified attributes in the destination with those in the source.void
replaceAttributesWithDelete
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will replace the specified attributes in the destination with those in the source.void
Used for Resetting the count for a sessionvoid
resetCount
(LongField tempKey, LongField tempKey1, LongField tempKey2, IntField index) void
Used for setting the count for a sessionvoid
Sets the field processor, used for performing lots of functionality through the hooks in this class.void
setKey
(DCFieldContainer nar) This will set the key value based on the input NAR for a specific hash table for all following operationsvoid
setKey
(DCFieldContainer nar, IntField index) void
Stores a NAR in the table indicatedvoid
storeNAR
(DCFieldContainer in, IntField index) void
Stores a NAR in the table indicated and also turns on the timer.void
storeNARSavedTimer
(DCFieldContainer in, IntField index) void
Stores a NAR in the table indicated and also turns on the timer.void
storeNARWithTimer
(DCFieldContainer in, IntField index) void
sumAttributes
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) Performs summation on each of the indicated attributes.sumAttributesNoOverflow
(DCFieldContainer source, DCFieldContainer dest, StringField attrList) Performs summation on each of the indicated attributes and does not allow an overflow.void
sumValue
(LongField sourceValue, DCFieldContainer dest, StringField attrList) This will sum the value of each attribute and the constant passed in.sumValueNoOverflow
(LongField sourceValue, DCFieldContainer dest, StringField attrList) This will sum the value of each attribute and the constant passed in while not allowing an overflow to occur.void
testCall()
-
Field Details
-
aggregatedCounts
-
duplicateCounts
-
-
Constructor Details
-
FlexibleAggregatorHandler
public FlexibleAggregatorHandler()
-
-
Method Details
-
setFieldProcessor
Sets the field processor, used for performing lots of functionality through the hooks in this class. -
setKey
This will set the key value based on the input NAR for a specific hash table for all following operations -
setKey
-
storeNAR
Stores a NAR in the table indicated -
storeNAR
-
printTimer
Useful for debugging. Informs you (in milliseconds) the time that a NAR with key of nar will be flushed from the table -
storeNARWithTimer
Stores a NAR in the table indicated and also turns on the timer. Note that any previous timer settings are NOT removed by this method. Any previous timers that should be removed should be handled before this is called. If an entry for the currently set key already exists in the table, it will be removed and replaced. -
storeNARWithTimer
-
storeNARSavedTimer
Stores a NAR in the table indicated and also turns on the timer. This version of storeNAR is meant to be used in conjunction with getNARSaveTimer, as this one will re-activate the timer. -
storeNARSavedTimer
-
removeTimer
public void removeTimer()This will remove a timer for an item removed with getNARSaveTimer. -
removeTimer
-
getNAR
This will remove and return a NAR from the indicated table. Should never just get a NAR from the table without removing, as then synchronization would be required between the NPL and the timers. There would be the possibility of the timer going off and flushing a record already returned to the NPL. Returns 1 for success, 0 for failure. -
getNAR
-
getNARSaveTimer
This will remove and return a NAR as the functions above, but the underlying timer will be stored to be reused with the same key. -
getNARSaveTimer
-
removeNAR
This will just remove an entry from the table. Returns 1 for success, 0 for failure. -
removeNAR
-
removeNARTimer
A nar removed from the table with getNarSaveTimer will still have a timer in the timer table. This call will explicitly remove the timer with key of the NAR -
removeNARTimer
-
setCount
Used for setting the count for a session -
getCount
public IntField getCount(LongField tempKey, LongField tempKey1, LongField tempKey2, IntField index, IntField flushCount) Used for getting the count for a session -
reset
Used for Resetting the count for a session -
resetCount
-
compareBytes
This should be added to NPL at some point rather than using a specific java hook. -
getBytesValueFromListMapIp
public IntField getBytesValueFromListMapIp(ListField theList, IntField index, DCFieldContainer dest, StringField attrId) Function to return a specific element from a list type. Returns 1 if successful, 0 if the copy could not be performed. -
getDayOfYear
This will return the day of the year as an integer. -
getPreviousDayOfYear
This will return the previous day of the year as an integer. -
sumAttributes
Performs summation on each of the indicated attributes. -
sumAttributesNoOverflow
public IntField sumAttributesNoOverflow(DCFieldContainer source, DCFieldContainer dest, StringField attrList) Performs summation on each of the indicated attributes and does not allow an overflow. If an overflow occurs, the destination will be returned unchanged and the return value will be 0. If no overflow occurs this will return 1. Only checks for overflow of positive values. -
keepMaxAttributes
This will go through each of the attributes and keep the greater of the two. -
keepMinAttributes
This will go through each of the attributes and keep the smaller of the two. -
mapAttributes
public void mapAttributes(DCFieldContainer source, DCFieldContainer dest, StringField sourceAttrs, StringField destAttrs) This will perform various assignments. This difference between this and replaceAttributes is this performs assignments between different attribute IDs, where replaceAttributes always assigns to the same ID. -
mapAttributeSets
public void mapAttributeSets(DCFieldContainer source, DCFieldContainer dest, StringField sourceSet, StringField destSet) -
appendLists
This will append the source list onto the end of the dest list. -
appendListsWithoutRepeat
public void appendListsWithoutRepeat(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will append the source list onto the end of the dest list. It will not allow an appended item to be the same as the previous item. This prevents continuously appending the same item to the end of the list. -
sumValue
This will sum the value of each attribute and the constant passed in. -
sumValueNoOverflow
public IntField sumValueNoOverflow(LongField sourceValue, DCFieldContainer dest, StringField attrList) This will sum the value of each attribute and the constant passed in while not allowing an overflow to occur. Normally this will return 1. If an overflow occurs, none of the attributes will be summed, and 0 will be returned. -
concatenateStrings
public void concatenateStrings(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will concatenate the strings for each attribute listed with no separator. -
concatenateStrings
public void concatenateStrings(DCFieldContainer source, DCFieldContainer dest, StringField separator, StringField attrList) This will concatenate the strings for each attribute listed, using the optional separator in between each. -
replaceAttributes
This will replace the specified attributes in the destination with those in the source. If any source attributes do not exist, the correcponding destination attributes will not be altered.- See Also:
-
replaceAttributeSet
public void replaceAttributeSet(DCFieldContainer source, DCFieldContainer dest, StringField attrSetName) This will replace the specified attributes in the destination with those in the source. If any source attributes do not exist, the correcponding destination attributes will not be altered.- See Also:
-
replaceAttributesWithDelete
public void replaceAttributesWithDelete(DCFieldContainer source, DCFieldContainer dest, StringField attrList) This will replace the specified attributes in the destination with those in the source. If any source attributes do not exist, the correcponding destination attributes will be removed.- See Also:
-
replaceAttributeSetWithDelete
public void replaceAttributeSetWithDelete(DCFieldContainer source, DCFieldContainer dest, StringField attrSetName) This will replace the specified attributes in the destination with those in the source. If any source attributes do not exist, the correcponding destination attributes will be removed.- See Also:
-
distributeTrafficVolumesPerDay
public IntField distributeTrafficVolumesPerDay(DCFieldContainer inContainer, StringField trafficVolumesID, DCFieldContainer destContainer, StringField uplinkVolumeAttrs, StringField downlinkVolumeAttrs, StringField openingTimeId) This will distribute the traffic volume uplink and downlink volumes into appropriate daily bins according to the individual times. If the traffic volumes goes past midnight, it will stop and return a 0. In this case, the volumes already processed for the previous day will be left processed. The list of traffic volumes will also have the processed volumes removed from the list. Only the unprocessed entries will remain. If no day change is detected, 1 is returned. The volumes are distributed according to their opening time. The first container's opening time is the record's opening time, specified by the openingTimeId for the inContainer. Each subsequent container's opening time is the closing time in the previous. If the volumes cross the midnight boundary, the end time for the last processed container is inserted into the record opening time ID. -
distributeTrafficVolumeSetPerDay
public IntField distributeTrafficVolumeSetPerDay(DCFieldContainer inContainer, StringField trafficVolumesID, DCFieldContainer destContainer, StringField uplinkSetName, StringField downlinkSetName, StringField openingTimeId) -
removeAttributes
This will remove all the indicated attributes from the given NAR. -
removeAttributeSet
This will remove all the indicated attributes from the given NAR. -
generateOpeningTimeFromTrafficVolume
Will return the day of the year for the first traffic volume. -
addDateStamp
-
copyTrafficVolumeQoS
public void copyTrafficVolumeQoS(DCFieldContainer mod, DCFieldContainer source, StringField name, StringField trafficVolumesName) -
testCall
public void testCall() -
handleSequenceNumberConversion
public void handleSequenceNumberConversion(DCFieldContainer in, DCFieldContainer out, StringField name, StringField recordNumberListName, StringField resultName, StringField ipAddrName, StringField ipAddrSourceName) -
incrementAggregatedCount
public void incrementAggregatedCount() -
incrementDuplicateCount
public void incrementDuplicateCount()
-