Package org.onosproject.net.statistic
Class PollInterval
- java.lang.Object
-
- org.onosproject.net.statistic.PollInterval
-
public final class PollInterval extends Object
Default polling interval values.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PollInterval()
Creates an default poll interval.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAvgPollInterval()
Returns average poll interval value in seconds.long
getEntirePollInterval()
Returns entire poll interval value in seconds.static PollInterval
getInstance()
Returns the singleton PollInterval instance class for FlowStatisticService and other statistic services.long
getLongPollInterval()
Returns long poll interval value in seconds.long
getMidPollInterval()
Returns mid poll interval value in seconds.long
getPollInterval()
Returns default poll interval value in seconds.void
setEntirePollInterval(long newPollInterval)
Sets the entire poll interval in seconds.void
setLongPollInterval(long newPollInterval)
Sets the long poll interval in seconds.void
setMidPollInterval(long newPollInterval)
Sets the mid poll interval in seconds.void
setPollInterval(long newPollInterval)
Sets the poll interval in seconds.
-
-
-
Method Detail
-
getInstance
public static PollInterval getInstance()
Returns the singleton PollInterval instance class for FlowStatisticService and other statistic services. This instance is only used Adaptive Flow Sampling(adaptiveFlowSampling) mode is enabled(true).- Returns:
- the singleton PollInterval instance class
-
setPollInterval
public void setPollInterval(long newPollInterval)
Sets the poll interval in seconds. Used solely for the purpose of computing the load.- Parameters:
newPollInterval
- poll interval duration in seconds
-
setMidPollInterval
public void setMidPollInterval(long newPollInterval)
Sets the mid poll interval in seconds. Used solely for the purpose of computing the load.- Parameters:
newPollInterval
- poll interval duration in seconds
-
setLongPollInterval
public void setLongPollInterval(long newPollInterval)
Sets the long poll interval in seconds. Used solely for the purpose of computing the load.- Parameters:
newPollInterval
- poll interval duration in seconds
-
setEntirePollInterval
public void setEntirePollInterval(long newPollInterval)
Sets the entire poll interval in seconds. Used solely for the purpose of computing the load.- Parameters:
newPollInterval
- poll interval duration in seconds
-
getPollInterval
public long getPollInterval()
Returns default poll interval value in seconds.- Returns:
- default poll interval
-
getMidPollInterval
public long getMidPollInterval()
Returns mid poll interval value in seconds.- Returns:
- mid poll interval
-
getLongPollInterval
public long getLongPollInterval()
Returns long poll interval value in seconds.- Returns:
- long poll interval
-
getEntirePollInterval
public long getEntirePollInterval()
Returns entire poll interval value in seconds.- Returns:
- entire poll interval
-
getAvgPollInterval
public long getAvgPollInterval()
Returns average poll interval value in seconds.- Returns:
- average poll interval
-
-