Package org.onosproject.cpman
Class ControlMetricsRequest
- java.lang.Object
-
- org.onosproject.cpman.ControlMetricsRequest
-
public class ControlMetricsRequest extends Object
A container class that is used to request control metric of remote node.
-
-
Constructor Summary
Constructors Constructor Description ControlMetricsRequest(ControlMetricType type, int duration, TimeUnit unit, String resourceName)
Instantiates a new control metric request of the control metric type and resource name with the given projected time range.ControlMetricsRequest(ControlMetricType type, int duration, TimeUnit unit, Optional<DeviceId> deviceId)
Instantiates a new control metric request of the control metric type and device identifier with the given projected time range.ControlMetricsRequest(ControlMetricType type, String resourceName)
Instantiates a new control metric request of the control metric type and resource name.ControlMetricsRequest(ControlMetricType type, Optional<DeviceId> deviceId)
Instantiates a new control metric request of the control metric type and device identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Optional<DeviceId>
getDeviceId()
Obtains device identifier.int
getDuration()
Obtains projected time duration.String
getResourceName()
Obtains resource name.ControlMetricType
getType()
Obtains control metric type.TimeUnit
getUnit()
Obtains projected time unit.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
ControlMetricsRequest
public ControlMetricsRequest(ControlMetricType type, Optional<DeviceId> deviceId)
Instantiates a new control metric request of the control metric type and device identifier.- Parameters:
type
- control metric typedeviceId
- device identifier
-
ControlMetricsRequest
public ControlMetricsRequest(ControlMetricType type, int duration, TimeUnit unit, Optional<DeviceId> deviceId)
Instantiates a new control metric request of the control metric type and device identifier with the given projected time range.- Parameters:
type
- control metric typeduration
- projected time durationunit
- projected time unitdeviceId
- device dientifer
-
ControlMetricsRequest
public ControlMetricsRequest(ControlMetricType type, String resourceName)
Instantiates a new control metric request of the control metric type and resource name.- Parameters:
type
- control metric typeresourceName
- resource name
-
ControlMetricsRequest
public ControlMetricsRequest(ControlMetricType type, int duration, TimeUnit unit, String resourceName)
Instantiates a new control metric request of the control metric type and resource name with the given projected time range.- Parameters:
type
- control metric typeduration
- projected time durationunit
- projected time unitresourceName
- resource name
-
-
Method Detail
-
getType
public ControlMetricType getType()
Obtains control metric type.- Returns:
- control metric type
-
getResourceName
public String getResourceName()
Obtains resource name.- Returns:
- resource name
-
getDeviceId
public Optional<DeviceId> getDeviceId()
Obtains device identifier.- Returns:
- device identifier
-
getDuration
public int getDuration()
Obtains projected time duration.- Returns:
- projected time duration
-
getUnit
public TimeUnit getUnit()
Obtains projected time unit.- Returns:
- projected time unit
-
-