"WEBNMS_5 API Docs"

com.adventnet.nms.poll
Class MultiplePolledData

java.lang.Object
  extended by com.adventnet.nms.poll.PolledData
      extended by com.adventnet.nms.poll.MultiplePolledData
All Implemented Interfaces:
com.adventnet.nms.poll.corba.PolledData_CIOperations, DBExtendedInterface, DBInterface, java.io.Serializable, java.lang.Cloneable

public class MultiplePolledData
extends PolledData
implements java.io.Serializable, DBInterface

This class is the basic unit of data collection which specifies where, when and what of data collection and is basically used for collecting columnar values. i.e., fetching values for the entire column of the table. Here a single MultiplePolledData is used to fetch all the values of a particular column of the table. One MultiplePolledData will lead to "n" stats data while data collection where "n" is the number of rows in the table.

This class is very useful because of the following reasons.

To create MultiplePolledData at the time of configuration i.e., before starting Web NMS through the Polling.conf, specify the type as "multiple".A sample entry in Polling.conf would look like ,

 <DATA_TO_POLL
      name="MULTIPLE_1"
      dataIdentifier="2.2.1.10"
      type="multiple" />
 
To add MultiplePolledData dynamically during run time, set isMultiplePolledData property to true which will mark the particular PolledData to be of type multiple.

See Also:
Serialized Form

Field Summary
static java.util.Hashtable prevSeverHash
           
 
Fields inherited from class com.adventnet.nms.poll.PolledData
isPoller, pollapi
 
Constructor Summary
MultiplePolledData()
           
 
Method Summary
 void checkAgainstThresholds(long val, java.lang.String instant)
           
 void checkAgainstThresholds(java.lang.String val, java.lang.String instant)
           
 java.lang.Object clone()
          Return a new object which is a clone of this
 java.lang.String getCurrentIndex()
          Gets the current index of the MultiplePolledData.
 java.util.Hashtable getMulThresholdNames()
          Returns the ThresholdObject names associated with the instance of this PolledData.
 java.util.Properties getProperties()
          Returns the Properties of this MultiplePolledData.
 java.util.Vector getThresholdNames(java.lang.String instance)
          Returns the ThresholdObject names associated with the instance of this PolledData.
 void setCurrentIndex(java.lang.String index)
          Sets the current index of the MultiplePolledData.
 void setMulThresholdNames(java.util.Hashtable threshHash)
          Sets the ThresholdObject names for instance/index of this PolledData.
 void setProperties(java.util.Properties p)
          Sets the Properties of the MultiplePolledData object with the given Properties.
Note:Id of this MultiplePolledData cannot be set using this method.
 void setThresholdNames(java.lang.String instance, java.util.Vector v)
          Sets the ThresholdObject names for instance of this PolledData.
 
Methods inherited from class com.adventnet.nms.poll.PolledData
checkAgainstThresholds, getActive, getAgent, getCommunity, getContextName, getCounterUpdateRequired, getCurrentSaveCount, getDnsName, getDynamicUserProperty, getExtension, getFailureCount, getFailureThreshold, getGroupName, getId, getInstance, getIsMultiplePolledData, getKey, getKeyName, getLastCounterValue, getLastTimeValue, getLockId, getLogDirectly, getLogFile, getMappedProperties, getName, getNumericType, getOid, getOwnerName, getParentObj, getPeriod, getPolicyName, getPollerName, getPort, getPreviousSeverity, getProperties_CT, getProtocol, getSave, getSaveAbsolutes, getSaveOnThreshold, getSavePollCount, getSnmpVersion, getStatsDataTableName, getSuffix, getThreshold, getThresholdList, getThresholdNames, getTieRefHolder_PolledData, getTimeAvg, getTimeVal, getUserName, getUserProperties, getUserProperty, getWebNMS, logAllData, logAllData, logAllData, removeUserProperty, setActive, setAgent, setCommunity, setContextName, setCounterUpdateRequired, setCurrentSaveCount, setDnsName, setDynamicUserProperty, setExtension, setFailureCount, setFailureThreshold, setGroupName, setId, setInstance, setIsMultiplePolledData, setLockId, setLogDirectly, setLogFile, setMappedProperties, setName, setNumericType, setOid, setOwnerName, setParentObj, setPeriod, setPolicyName, setPollerName, setPort, setPreviousSeverity, setProperties_CT, setProtocol, setSave, setSaveAbsolutes, setSaveOnThreshold, setSavePollCount, setSnmpVersion, setStatsDataTableName, setSuffix, setThreshold, setThresholdList, setThresholdNames, setTimeAvg, setTimeVal, setUserName, setUserProperty, setWebNMS, updateCurrentSaveCount
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.adventnet.nms.store.DBInterface
getKey, getKeyName
 

Field Detail

prevSeverHash

public static java.util.Hashtable prevSeverHash
Constructor Detail

MultiplePolledData

public MultiplePolledData()
Method Detail

setCurrentIndex

public void setCurrentIndex(java.lang.String index)
Sets the current index of the MultiplePolledData. Basically MultiplePolledDatas are used to collect columnar values of tables and in the table each and every row is identified by a unique instance value, i.e., each and every row is associated with a unique instance value, current index is a pointer to one such instance value and this method is used to make the pointer point to any particular instance.

Parameters:
index - the instance to which the current index must point to.

getCurrentIndex

public java.lang.String getCurrentIndex()
Gets the current index of the MultiplePolledData. Basically MultiplePolledDatas are used to collect columnar values of tables and in the table each and every row is identified by a unique instance value, i.e., each and every row is associated with a unique instance value, current index is a pointer to one such instance value and this method is used to get the instance the pointer is pointing to.

Returns:
the instance to which the current index is pointing as String.

checkAgainstThresholds

public void checkAgainstThresholds(long val,
                                   java.lang.String instant)
Overrides:
checkAgainstThresholds in class PolledData

checkAgainstThresholds

public void checkAgainstThresholds(java.lang.String val,
                                   java.lang.String instant)

setProperties

public void setProperties(java.util.Properties p)
Sets the Properties of the MultiplePolledData object with the given Properties.
Note:Id of this MultiplePolledData cannot be set using this method.

Specified by:
setProperties in interface DBInterface
Overrides:
setProperties in class PolledData
Parameters:
p - Properties to be set

getProperties

public java.util.Properties getProperties()
Returns the Properties of this MultiplePolledData.

Specified by:
getProperties in interface DBInterface
Overrides:
getProperties in class PolledData
Returns:
Properties of this MultiplePolledData.

setThresholdNames

public void setThresholdNames(java.lang.String instance,
                              java.util.Vector v)
Sets the ThresholdObject names for instance of this PolledData. In case multiple Thresholds are associated with each instance then thresholds with highest severity takes precedence over other thresholds.

Parameters:
instance - instance/index of PolledData to which the thresholds need to be associated.
v - vector containing the names of the Threshold Objects
See Also:
PolledData.setThresholdNames(Vector), setMulThresholdNames(Hashtable), PolledData.getThresholdNames(), getThresholdNames(String), getMulThresholdNames(), PolledData.getThreshold(), PolledData.setThreshold(boolean), ThresholdObject

setMulThresholdNames

public void setMulThresholdNames(java.util.Hashtable threshHash)
Sets the ThresholdObject names for instance/index of this PolledData. In case multiple Thresholds are associated with a PolledData then thresholds with highest severity takes precedence over other thresholds.

Parameters:
threshHash - Hashtable containing index and the names of the Threshold Objects associated with that index The key-value pair in the Hastable is as follows key ----- value indx1 ----- Vector ("thresh1","thresh2") indx2 ----- Vector ("thresh3")
See Also:
PolledData.setThresholdNames(Vector), setThresholdNames(String, Vector), PolledData.getThresholdNames(), getThresholdNames(String), getMulThresholdNames(), PolledData.getThreshold(), PolledData.setThreshold(boolean), ThresholdObject

getThresholdNames

public java.util.Vector getThresholdNames(java.lang.String instance)
Returns the ThresholdObject names associated with the instance of this PolledData.

Returns:
vector of ThresholdObjects names associated with the instance of this PolledData If no thresholds are associated with the instance/index, null is returned. If the thresholds are associated to the PolledData and not to each instance, all the thresholds associated with this PolledData are returned
See Also:
PolledData.setThresholdNames(Vector), setThresholdNames(String, Vector), setMulThresholdNames(Hashtable), PolledData.getThresholdNames(), getMulThresholdNames(), PolledData.getThreshold(), PolledData.setThreshold(boolean), ThresholdObject

getMulThresholdNames

public java.util.Hashtable getMulThresholdNames()
Returns the ThresholdObject names associated with the instance of this PolledData.

Returns:
hashtable of ThresholdObjects names associated with the instances The key-value pair in the Hastable is as follows key ----- value indx1 ----- Vector ("thresh1","thresh2") indx2 ----- Vector ("thresh3")
See Also:
PolledData.setThresholdNames(Vector), setThresholdNames(String, Vector), setMulThresholdNames(Hashtable), PolledData.getThresholdNames(), getThresholdNames(String), PolledData.getThreshold(), PolledData.setThreshold(boolean), ThresholdObject

clone

public java.lang.Object clone()
Return a new object which is a clone of this

Specified by:
clone in interface DBInterface
Overrides:
clone in class PolledData
Returns:
a clone of this MultiplePolledData

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.