Package org.onosproject.net.group
Interface GroupBucket
-
- All Known Subinterfaces:
StoredGroupBucketEntry
- All Known Implementing Classes:
DefaultGroupBucket
public interface GroupBucket
Group Bucket definition. A default group Bucket is collection of Instructions that can be performed on a traffic flow. A failover group bucket is associated with a specific port or group that controls its liveness. A select group bucket contains optional weight field to define the weights among the buckets in the group.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
bytes()
Returns the number of bytes processed by this group bucket.boolean
hasSameParameters(GroupBucket other)
Returns whether the given group bucket has the same parameters (weight, watchPort and watchGroup) as this.long
packets()
Returns the number of packets processed by this group bucket.TrafficTreatment
treatment()
Returns list of Traffic instructions that are part of the bucket.GroupDescription.Type
type()
Returns group type of the bucket.GroupId
watchGroup()
Returns group identifier used for liveness detection for a failover bucket.PortNumber
watchPort()
Returns port number used for liveness detection for a failover bucket.short
weight()
Returns weight of select group bucket.
-
-
-
Method Detail
-
type
GroupDescription.Type type()
Returns group type of the bucket.- Returns:
- GroupType group type
-
treatment
TrafficTreatment treatment()
Returns list of Traffic instructions that are part of the bucket.- Returns:
- TrafficTreatment traffic instruction list
-
weight
short weight()
Returns weight of select group bucket.- Returns:
- short weight associated with a bucket
-
watchPort
PortNumber watchPort()
Returns port number used for liveness detection for a failover bucket.- Returns:
- PortNumber port number used for liveness detection
-
watchGroup
GroupId watchGroup()
Returns group identifier used for liveness detection for a failover bucket.- Returns:
- GroupId group identifier to be used for liveness detection
-
packets
long packets()
Returns the number of packets processed by this group bucket.- Returns:
- number of packets
-
bytes
long bytes()
Returns the number of bytes processed by this group bucket.- Returns:
- number of bytes
-
hasSameParameters
boolean hasSameParameters(GroupBucket other)
Returns whether the given group bucket has the same parameters (weight, watchPort and watchGroup) as this.- Parameters:
other
- group bucket to compare- Returns:
- true if this bucket has the same parameters as other, false otherwise
-
-