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 TypeMethodDescriptionvoid
int
Returns the average rate per second of nars passing through the stream handler since the node started.int
Returns the average rate per second of nars passing through the stream handler since the last performance check.int
Returns difference between the current time and the time of the last performance check.long
Returns number of nars processed in this check interval.long
getNars()
Returns total number of nars passed through the stream handler.Returns the string id for the node it came fromint
Returns time node has been upvoid
void
reset()
void
void
setCheckTime
(int check) void
setNars
(long n) void
void
setNodeManagerIpAndPort
(String nodeManagerIpAndPort) void
setNodeStartTime
(int startTime) void
toString()
-
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:
reset
in interfaceDCNodePerformanceIfc
-
setNars
public void setNars(long n) -
getNars
public long getNars()Description copied from interface:DCNodePerformanceIfc
Returns total number of nars passed through the stream handler.- Specified by:
getNars
in interfaceDCNodePerformanceIfc
- Returns:
- total nars
-
getNarDelta
public long getNarDelta()Description copied from interface:DCNodePerformanceIfc
Returns number of nars processed in this check interval.- Specified by:
getNarDelta
in interfaceDCNodePerformanceIfc
- Returns:
- nar delta
-
getAvgNarRate
public int getAvgNarRate()Description copied from interface:DCNodePerformanceIfc
Returns the average rate per second of nars passing through the stream handler since the node started.- Specified by:
getAvgNarRate
in interfaceDCNodePerformanceIfc
- Returns:
- average nars per second
-
getCurrentNarRate
public int getCurrentNarRate()Description copied from interface:DCNodePerformanceIfc
Returns the average rate per second of nars passing through the stream handler since the last performance check.- Specified by:
getCurrentNarRate
in interfaceDCNodePerformanceIfc
- Returns:
- current nars per second
-
setCheckTime
public void setCheckTime(int check) -
getLastCheckDelta
public int getLastCheckDelta()Description copied from interface:DCNodePerformanceIfc
Returns difference between the current time and the time of the last performance check.- Specified by:
getLastCheckDelta
in interfaceDCNodePerformanceIfc
- Returns:
- check time delta
-
getNodeUpTime
public int getNodeUpTime()Description copied from interface:DCNodePerformanceIfc
Returns time node has been up- Specified by:
getNodeUpTime
in interfaceDCNodePerformanceIfc
- Returns:
- node up time
-
setNodeStartTime
public void setNodeStartTime(int startTime) -
getNodeId
Description copied from interface:DCNodePerformanceIfc
Returns the string id for the node it came from- Specified by:
getNodeId
in interfaceDCNodePerformanceIfc
- Returns:
- node id
-
setNodeId
-
toString
-
getNodeManagerIpAndPort
-
setNodeManagerIpAndPort
-
createMetrics
public void createMetrics() -
refreshMetrics
public void refreshMetrics()- Specified by:
refreshMetrics
in interfaceDCNodePerformanceIfc
-
setActive
- Specified by:
setActive
in interfaceDCNodePerformanceIfc
-
setStatus
- Specified by:
setStatus
in interfaceDCNodePerformanceIfc
-