Package com.nt.udc.ndk.node
Class DCNodePerformance
java.lang.Object
com.nt.udc.ndk.node.DCNodePerformance
- All Implemented Interfaces:
DCNodePerformanceIfc,Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintReturns the average rate per second of nars passing through the stream handler since the node started.intReturns the average rate per second of nars passing through the stream handler since the last performance check.intReturns difference between the current time and the time of the last performance check.longReturns number of nars processed in this check interval.longgetNars()Returns total number of nars passed through the stream handler.Returns the string id for the node it came fromintReturns time node has been upvoidvoidreset()voidvoidsetCheckTime(int check) voidsetNars(long n) voidvoidsetNodeManagerIpAndPort(String nodeManagerIpAndPort) voidsetNodeStartTime(int startTime) voidtoString()
-
Field Details
-
TOTAL_NARS
- See Also:
-
CURRENT_NARS
- See Also:
-
CURRENT_RATE
- See Also:
-
AVG_RATE
- See Also:
-
NODE_UP_TIME
- See Also:
-
NODE_RUNNING
- See Also:
-
NODE_STATUS
- See Also:
-
-
Constructor Details
-
DCNodePerformance
public DCNodePerformance() -
DCNodePerformance
-
-
Method Details
-
reset
public void reset()- Specified by:
resetin interfaceDCNodePerformanceIfc
-
setNars
public void setNars(long n) -
getNars
public long getNars()Description copied from interface:DCNodePerformanceIfcReturns total number of nars passed through the stream handler.- Specified by:
getNarsin interfaceDCNodePerformanceIfc- Returns:
- total nars
-
getNarDelta
public long getNarDelta()Description copied from interface:DCNodePerformanceIfcReturns number of nars processed in this check interval.- Specified by:
getNarDeltain interfaceDCNodePerformanceIfc- Returns:
- nar delta
-
getAvgNarRate
public int getAvgNarRate()Description copied from interface:DCNodePerformanceIfcReturns the average rate per second of nars passing through the stream handler since the node started.- Specified by:
getAvgNarRatein interfaceDCNodePerformanceIfc- Returns:
- average nars per second
-
getCurrentNarRate
public int getCurrentNarRate()Description copied from interface:DCNodePerformanceIfcReturns the average rate per second of nars passing through the stream handler since the last performance check.- Specified by:
getCurrentNarRatein interfaceDCNodePerformanceIfc- Returns:
- current nars per second
-
setCheckTime
public void setCheckTime(int check) -
getLastCheckDelta
public int getLastCheckDelta()Description copied from interface:DCNodePerformanceIfcReturns difference between the current time and the time of the last performance check.- Specified by:
getLastCheckDeltain interfaceDCNodePerformanceIfc- Returns:
- check time delta
-
getNodeUpTime
public int getNodeUpTime()Description copied from interface:DCNodePerformanceIfcReturns time node has been up- Specified by:
getNodeUpTimein interfaceDCNodePerformanceIfc- Returns:
- node up time
-
setNodeStartTime
public void setNodeStartTime(int startTime) -
getNodeId
Description copied from interface:DCNodePerformanceIfcReturns the string id for the node it came from- Specified by:
getNodeIdin interfaceDCNodePerformanceIfc- Returns:
- node id
-
setNodeId
-
toString
-
getNodeManagerIpAndPort
-
setNodeManagerIpAndPort
-
createMetrics
public void createMetrics() -
refreshMetrics
public void refreshMetrics()- Specified by:
refreshMetricsin interfaceDCNodePerformanceIfc
-
setActive
- Specified by:
setActivein interfaceDCNodePerformanceIfc
-
setStatus
- Specified by:
setStatusin interfaceDCNodePerformanceIfc
-