public class DefaultGroup extends DefaultGroupDescription implements Group, StoredGroupEntry
Group.GroupStateGroupDescription.Type| Constructor and Description |
|---|
DefaultGroup(GroupId id,
DeviceId deviceId,
GroupDescription.Type type,
GroupBuckets buckets)
Default group object constructor with the available information
from data plane.
|
DefaultGroup(GroupId id,
GroupDescription groupDesc)
Default group object constructor with the parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
age()
Obtains the age of a group.
|
long |
bytes()
Returns the number of bytes processed by this group.
|
boolean |
equals(Object obj) |
int |
failedRetryCount()
Returns the count for the number of attempts at programming a failed
group.
|
int |
hashCode() |
GroupId |
id()
Returns group identifier associated with a group object.
|
void |
incrFailedRetryCount()
Increments the count for the number of failed attempts in programming
this group.
|
boolean |
isGroupStateAddedFirstTime()
Returns the isGroupStateAddedFirstTime value.
|
long |
life()
Returns the number of milliseconds this group has been alive.
|
long |
packets()
Returns the number of packets processed by this group.
|
long |
referenceCount()
Returns the number of flow rules or other groups reference this group.
|
void |
setBytes(long bytes)
Sets number of bytes processed by this group entry.
|
void |
setFailedRetryCount(int failedRetryCount)
Sets the count for the number of failed attempts in programming this
group.
|
void |
setIsGroupStateAddedFirstTime(boolean isGroupStateAddedFirstTime)
Sets if group has transitioned to ADDED state for the first time.
|
void |
setLife(long life)
Sets how long this entry has been entered in the system.
|
void |
setPackets(long packets)
Sets number of packets processed by this group entry.
|
void |
setReferenceCount(long referenceCount)
Sets number of flow rules or groups referencing this group entry.
|
void |
setState(Group.GroupState newState)
Sets the new state for this entry.
|
Group.GroupState |
state()
Returns current state of a group object.
|
String |
toString() |
appCookie, appId, buckets, deviceId, givenGroupId, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitappCookie, appId, buckets, deviceId, givenGroupId, typepublic DefaultGroup(GroupId id, GroupDescription groupDesc)
id - group identifiergroupDesc - group description parameterspublic DefaultGroup(GroupId id, DeviceId deviceId, GroupDescription.Type type, GroupBuckets buckets)
id - group identifierdeviceId - device identifiertype - type of the groupbuckets - immutable list of group bucketpublic GroupId id()
public Group.GroupState state()
public long life()
public long packets()
public long bytes()
public int age()
Grouppublic int failedRetryCount()
GroupfailedRetryCount in interface Grouppublic void setState(Group.GroupState newState)
setState in interface StoredGroupEntrynewState - new group entry state.public void setLife(long life)
setLife in interface StoredGroupEntrylife - epoch timepublic void setPackets(long packets)
setPackets in interface StoredGroupEntrypackets - a long valuepublic void setBytes(long bytes)
setBytes in interface StoredGroupEntrybytes - a long valuepublic void setReferenceCount(long referenceCount)
StoredGroupEntrysetReferenceCount in interface StoredGroupEntryreferenceCount - reference countpublic long referenceCount()
GroupreferenceCount in interface Grouppublic void incrFailedRetryCount()
StoredGroupEntryincrFailedRetryCount in interface StoredGroupEntrypublic void setFailedRetryCount(int failedRetryCount)
StoredGroupEntrysetFailedRetryCount in interface StoredGroupEntryfailedRetryCount - count for number of failed attempts in
programming this grouppublic int hashCode()
hashCode in class DefaultGroupDescriptionpublic boolean equals(Object obj)
equals in class DefaultGroupDescriptionpublic String toString()
toString in class DefaultGroupDescriptionpublic void setIsGroupStateAddedFirstTime(boolean isGroupStateAddedFirstTime)
StoredGroupEntrysetIsGroupStateAddedFirstTime in interface StoredGroupEntryisGroupStateAddedFirstTime - true if group moves to ADDED state
for the first time.public boolean isGroupStateAddedFirstTime()
StoredGroupEntryisGroupStateAddedFirstTime in interface StoredGroupEntry