Package org.netxms.client.datacollection
Class DataCollectionObject
java.lang.Object
org.netxms.client.datacollection.DataCollectionObject
- Direct Known Subclasses:
- DataCollectionItem,- DataCollectionTable
Abstract data collection object
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected Stringprotected intprotected longstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected Stringprotected Stringprotected intprotected Stringprotected intprotected Stringprotected longprotected DataOriginprotected DataCollectionConfigurationprotected Stringstatic final intstatic final intstatic final intprotected Stringprotected intprotected longprotected longstatic final intstatic final intstatic final intprotected Stringprotected intprotected intprotected SnmpVersionprotected longprotected intprotected DataCollectionObjectStatusprotected Stringprotected longprotected longprotected longprotected Stringprotected Objectprotected String
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDefault constructor (intended for deserialization)protectedDataCollectionObject(long nodeId, long id) Constructor for new data collection objects.protectedDataCollectionObject(DataCollectionConfiguration owner, long id) Constructor for new data collection objects.protectedDataCollectionObject(DataCollectionConfiguration owner, long nodeId, long id) Constructor for new data collection objects.protectedCreate data collection object from NXCP messageObject copy constructor
- 
Method SummaryModifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg) Fill NXCP message with item's data.Get data collection object access listintintintgetFlags()longgetId()final Stringfinal Stringfinal intintGet instance retention timegetName()longGet ID of owning node.getOwner()Get owning data collection configuration.intlonglongintintlongGet source node (node where actual data collection took place) IDintGet system tag.longlonglongGet time until which threshold processing is disabled for this DCI.Get user-assigned tag.booleanbooleanInclude node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)booleanReturns if dco is hidden on Last Values viewbooleanbooleanbooleanvoidsetAccessList(List<Integer> list) Set data collection object access listvoidsetAggregateOnCluster(boolean enable) voidsetAggregateWithErrors(boolean enable) Enable or disable inclusion of node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)voidsetCacheMode(AgentCacheMode mode) voidsetComments(String comments) voidsetDescription(String description) voidsetFlags(int flags) voidsetHideOnLastValuesView(boolean enable) Enable or disable usage of this DCI for node status calculationvoidsetId(long id) final voidsetInstanceDiscoveryData(String instanceDiscoveryData) final voidsetInstanceDiscoveryFilter(String instanceDiscoveryFilter) final voidsetInstanceDiscoveryMethod(int instanceDiscoveryMethod) voidsetInstanceName(String instanceName) voidsetInstanceRetentionTime(int instanceRetentionTime) Set instance retention timevoidvoidsetNodeId(long nodeId) voidsetOrigin(DataOrigin origin) voidsetPerfTabSettings(String perfTabSettings) voidsetPollingInterval(String pollingInterval) voidsetPollingScheduleType(int pollingScheduleType) voidsetRelatedObject(long relatedObject) voidsetResourceId(long resourceId) voidsetRetentionTime(String retentionTime) voidsetRetentionType(int retentionType) voidsetSchedules(Collection<String> newSchedules) Set schedulesvoidsetSnmpPort(int snmpPort) voidsetSnmpVersion(SnmpVersion snmpVersion) voidsetSourceNode(long sourceNode) Set source node (node where actual data collection took place) ID.voidsetStatus(DataCollectionObjectStatus status) voidsetSystemTag(String systemTag) Set system tag.voidsetTemplateId(long templateId) voidsetThresholdDisableEndTime(long thresholdDisableEndTime) Set time until which threshold processing is disabled for this DCI.voidsetTransformAggregated(boolean enable) voidsetTransformationScript(String transformationScript) voidsetUserData(Object userData) voidsetUserTag(String userTag) Set user-assigned tag.
- 
Field Details- 
DCO_TYPE_GENERICpublic static final int DCO_TYPE_GENERIC- See Also:
 
- 
DCO_TYPE_ITEMpublic static final int DCO_TYPE_ITEM- See Also:
 
- 
DCO_TYPE_TABLEpublic static final int DCO_TYPE_TABLE- See Also:
 
- 
DCF_AGGREGATE_ON_CLUSTERpublic static final int DCF_AGGREGATE_ON_CLUSTER- See Also:
 
- 
DCF_TRANSFORM_AGGREGATEDpublic static final int DCF_TRANSFORM_AGGREGATED- See Also:
 
- 
DCF_CACHE_MODE_MASKpublic static final int DCF_CACHE_MODE_MASK- See Also:
 
- 
DCF_AGGREGATE_WITH_ERRORSpublic static final int DCF_AGGREGATE_WITH_ERRORS- See Also:
 
- 
DCF_HIDE_ON_LAST_VALUES_PAGEpublic static final int DCF_HIDE_ON_LAST_VALUES_PAGE- See Also:
 
- 
IDM_NONEpublic static final int IDM_NONE- See Also:
 
- 
IDM_AGENT_LISTpublic static final int IDM_AGENT_LIST- See Also:
 
- 
IDM_AGENT_TABLEpublic static final int IDM_AGENT_TABLE- See Also:
 
- 
IDM_SNMP_WALK_VALUESpublic static final int IDM_SNMP_WALK_VALUES- See Also:
 
- 
IDM_SNMP_WALK_OIDSpublic static final int IDM_SNMP_WALK_OIDS- See Also:
 
- 
IDM_SCRIPTpublic static final int IDM_SCRIPT- See Also:
 
- 
IDM_WINPERFpublic static final int IDM_WINPERF- See Also:
 
- 
IDM_WEB_SERVICEpublic static final int IDM_WEB_SERVICE- See Also:
 
- 
IDM_INTERNAL_TABLEpublic static final int IDM_INTERNAL_TABLE- See Also:
 
- 
IDM_SMCLP_TARGETSpublic static final int IDM_SMCLP_TARGETS- See Also:
 
- 
IDM_SMCLP_PROPERTIESpublic static final int IDM_SMCLP_PROPERTIES- See Also:
 
- 
IDM_PUSHpublic static final int IDM_PUSH- See Also:
 
- 
POLLING_SCHEDULE_DEFAULTpublic static final int POLLING_SCHEDULE_DEFAULT- See Also:
 
- 
POLLING_SCHEDULE_CUSTOMpublic static final int POLLING_SCHEDULE_CUSTOM- See Also:
 
- 
POLLING_SCHEDULE_ADVANCEDpublic static final int POLLING_SCHEDULE_ADVANCED- See Also:
 
- 
RETENTION_DEFAULTpublic static final int RETENTION_DEFAULT- See Also:
 
- 
RETENTION_CUSTOMpublic static final int RETENTION_CUSTOM- See Also:
 
- 
RETENTION_NONEpublic static final int RETENTION_NONE- See Also:
 
- 
owner
- 
idprotected long id
- 
nodeIdprotected long nodeId
- 
templateIdprotected long templateId
- 
templateItemIdprotected long templateItemId
- 
resourceIdprotected long resourceId
- 
sourceNodeprotected long sourceNode
- 
pollingScheduleTypeprotected int pollingScheduleType
- 
pollingInterval
- 
retentionTypeprotected int retentionType
- 
retentionTime
- 
origin
- 
status
- 
flagsprotected int flags
- 
stateFlagsprotected int stateFlags
- 
transformationScript
- 
name
- 
description
- 
systemTag
- 
userTag
- 
perfTabSettings
- 
snmpPortprotected int snmpPort
- 
snmpVersion
- 
schedules
- 
userData
- 
comments
- 
instanceName
- 
instanceDiscoveryMethodprotected int instanceDiscoveryMethod
- 
instanceDiscoveryData
- 
instanceDiscoveryFilter
- 
accessList
- 
instanceRetentionTimeprotected int instanceRetentionTime
- 
thresholdDisableEndTimeprotected long thresholdDisableEndTime
 
- 
- 
Constructor Details- 
DataCollectionObjectCreate data collection object from NXCP message- Parameters:
- owner- Owning configuration object
- msg- NXCP message
 
- 
DataCollectionObjectConstructor for new data collection objects.- Parameters:
- owner- Owning configuration object
- nodeId- Owning node ID
- id- Identifier assigned to new item
 
- 
DataCollectionObjectConstructor for new data collection objects.- Parameters:
- owner- Owning configuration object
- id- Identifier assigned to new item
 
- 
DataCollectionObjectprotected DataCollectionObject(long nodeId, long id) Constructor for new data collection objects.- Parameters:
- nodeId- Owning node ID
- id- Identifier assigned to new item
 
- 
DataCollectionObjectprotected DataCollectionObject()Default constructor (intended for deserialization)
- 
DataCollectionObjectObject copy constructor- Parameters:
- owner- object owner
- src- object to copy
 
 
- 
- 
Method Details- 
fillMessageFill NXCP message with item's data.- Parameters:
- msg- NXCP message
 
- 
getTemplateIdpublic long getTemplateId()- Returns:
- the templateId
 
- 
setTemplateIdpublic void setTemplateId(long templateId) - Parameters:
- templateId- the templateId to set
 
- 
getResourceIdpublic long getResourceId()- Returns:
- the resourceId
 
- 
setResourceIdpublic void setResourceId(long resourceId) - Parameters:
- resourceId- the resourceId to set
 
- 
getSourceNodepublic long getSourceNode()Get source node (node where actual data collection took place) ID- Returns:
- source node ID (0 if not set)
 
- 
setSourceNodepublic void setSourceNode(long sourceNode) Set source node (node where actual data collection took place) ID. Set to 0 to use DCI's owning node.- Parameters:
- sourceNode- source node ID
 
- 
getPollingInterval- Returns:
- the pollingInterval
 
- 
getComparablePollingIntervalpublic int getComparablePollingInterval()- Returns:
- polling interval suitable for sorting
 
- 
setPollingInterval- Parameters:
- pollingInterval- the pollingInterval to set
 
- 
getPollingScheduleTypepublic int getPollingScheduleType()- Returns:
- the pollingScheduleType
 
- 
setPollingScheduleTypepublic void setPollingScheduleType(int pollingScheduleType) - Parameters:
- pollingScheduleType- the pollingScheduleType to set
 
- 
getRetentionTime- Returns:
- the retentionTime
 
- 
getComparableRetentionTimepublic int getComparableRetentionTime()- Returns:
- The retention time
 
- 
setRetentionTime- Parameters:
- retentionTime- the retentionTime to set
 
- 
getRetentionTypepublic int getRetentionType()- Returns:
- the retentionType
 
- 
setRetentionTypepublic void setRetentionType(int retentionType) - Parameters:
- retentionType- the retentionType to set
 
- 
getOrigin- Returns:
- the origin
 
- 
setOrigin- Parameters:
- origin- the origin to set
 
- 
getStatus- Returns:
- the status
 
- 
setStatus- Parameters:
- status- the status to set
 
- 
isUseAdvancedSchedulepublic boolean isUseAdvancedSchedule()- Returns:
- the useAdvancedSchedule
 
- 
getName- Returns:
- the name
 
- 
setName- Parameters:
- name- the name to set
 
- 
getDescription- Returns:
- the description
 
- 
setDescription- Parameters:
- description- the description to set
 
- 
getIdpublic long getId()- Returns:
- the id
 
- 
getSchedules- Returns:
- the schedules
 
- 
setSchedulesSet schedules- Parameters:
- newSchedules- Collection containing new schedules
 
- 
getOwnerGet owning data collection configuration.- Returns:
- the owner
 
- 
getNodeIdpublic long getNodeId()Get ID of owning node.- Returns:
- id of owning node
 
- 
getSystemTagGet system tag. In most situations, system tag should not be shown to user.- Returns:
- System tag associated with this DCI
 
- 
setSystemTagSet system tag. In most situations, user should not have possibility to set system tag manually.- Parameters:
- systemTag- New system tag for DCI
 
- 
getUserTagGet user-assigned tag.- Returns:
- User-assigned tag of this DCI
 
- 
setUserTagSet user-assigned tag.- Parameters:
- userTag- New user-assigned tag for DCI
 
- 
getPerfTabSettings- Returns:
- the perfTabSettings
 
- 
setPerfTabSettings- Parameters:
- perfTabSettings- the perfTabSettings to set
 
- 
getSnmpPortpublic int getSnmpPort()- Returns:
- the snmpPort
 
- 
setSnmpPortpublic void setSnmpPort(int snmpPort) - Parameters:
- snmpPort- the snmpPort to set
 
- 
getSnmpVersion- Returns:
- the snmpVersion
 
- 
setSnmpVersion- Parameters:
- snmpVersion- the snmpVersion to set
 
- 
getFlagspublic int getFlags()- Returns:
- the flags
 
- 
setFlagspublic void setFlags(int flags) - Parameters:
- flags- the flags to set
 
- 
getStateFlagspublic int getStateFlags()- Returns:
- the stateFlags
 
- 
getTransformationScript- Returns:
- the transformationScript
 
- 
setTransformationScript- Parameters:
- transformationScript- the transformationScript to set
 
- 
getUserData- Returns:
- the userData
 
- 
setUserData- Parameters:
- userData- the userData to set
 
- 
isAggregateOnClusterpublic boolean isAggregateOnCluster()- Returns:
- the processAllThresholds
 
- 
setAggregateOnClusterpublic void setAggregateOnCluster(boolean enable) 
- 
isAggregateWithErrorspublic boolean isAggregateWithErrors()Include node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)- Returns:
- true if enabled
 
- 
setAggregateWithErrorspublic void setAggregateWithErrors(boolean enable) Enable or disable inclusion of node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)- Parameters:
- enable- true to enable
 
- 
isTransformAggregatedpublic boolean isTransformAggregated()
- 
setTransformAggregatedpublic void setTransformAggregated(boolean enable) 
- 
getComments- Returns:
- the comments
 
- 
setComments- Parameters:
- comments- the comments to set
 
- 
getCacheMode- Returns:
- aggregation function
 
- 
setCacheMode
- 
isNewItempublic boolean isNewItem()
- 
setIdpublic void setId(long id) 
- 
setNodeIdpublic void setNodeId(long nodeId) 
- 
getInstanceName- Returns:
- instance name
 
- 
setInstanceName- Parameters:
- instanceName- the instance to set
 
- 
getInstanceDiscoveryMethodpublic final int getInstanceDiscoveryMethod()- Returns:
- the instanceDiscoveryMethod
 
- 
setInstanceDiscoveryMethodpublic final void setInstanceDiscoveryMethod(int instanceDiscoveryMethod) - Parameters:
- instanceDiscoveryMethod- the instanceDiscoveryMethod to set
 
- 
getInstanceDiscoveryData- Returns:
- the instanceDiscoveryData
 
- 
setInstanceDiscoveryData- Parameters:
- instanceDiscoveryData- the instanceDiscoveryData to set
 
- 
getInstanceDiscoveryFilter- Returns:
- the instanceDiscoveryFilter
 
- 
setInstanceDiscoveryFilter- Parameters:
- instanceDiscoveryFilter- the instanceDiscoveryFilter to set
 
- 
getAccessListGet data collection object access list- Returns:
- access list
 
- 
setAccessListSet data collection object access list- Parameters:
- list- new access list
 
- 
getInstanceRetentionTimepublic int getInstanceRetentionTime()Get instance retention time- Returns:
- instance retention time
 
- 
setInstanceRetentionTimepublic void setInstanceRetentionTime(int instanceRetentionTime) Set instance retention time- Parameters:
- instanceRetentionTime- the retention time to set
 
- 
isHideOnLastValuesViewpublic boolean isHideOnLastValuesView()Returns if dco is hidden on Last Values view- Returns:
- if dco should be hidden on Last Values view
 
- 
setHideOnLastValuesViewpublic void setHideOnLastValuesView(boolean enable) Enable or disable usage of this DCI for node status calculation- Parameters:
- enable- true to enable
 
- 
getRelatedObjectpublic long getRelatedObject()- Returns:
- the relatedObject
 
- 
setRelatedObjectpublic void setRelatedObject(long relatedObject) - Parameters:
- relatedObject- the relatedObject to set
 
- 
getTemplateItemIdpublic long getTemplateItemId()- Returns:
- the templateItemId
 
- 
getThresholdDisableEndTimepublic long getThresholdDisableEndTime()Get time until which threshold processing is disabled for this DCI. Value of 0 means that threshold processing is enabled. Value of -1 means that threshold processing is disabled permanently.- Returns:
- the thresholdDisableEndTime time in seconds since epoch until which threshold processing is disabled
 
- 
setThresholdDisableEndTimepublic void setThresholdDisableEndTime(long thresholdDisableEndTime) Set time until which threshold processing is disabled for this DCI. Value of 0 means that threshold processing is enabled. Value of -1 means that threshold processing is disabled permanently.- Parameters:
- thresholdDisableEndTime- time in seconds since epoch until which threshold processing is disabled
 
 
-