public class NetricsRecord
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
NetricsRecord(java.lang.String key,
java.lang.String[] fields)
Create a NetricsRecord object.
|
NetricsRecord(java.lang.String key,
java.lang.String[] fields,
java.lang.String[] attr_names,
java.lang.String[] attr_values)
Create a NetricsRecord object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
compare(NetricsRecord rec)
Compare two records.
|
java.lang.String |
getAttribute(java.lang.String attr_name)
Gets the specified attribute value of the record.
|
java.lang.String[] |
getAttrNames()
Returns the names of name/value attributes of the record.
|
java.lang.String[] |
getAttrValues()
Returns the values of name/value attributes of the record.
|
java.lang.String[] |
getFields()
Can be used to get the content of a record returned from a tbldump.
|
java.lang.String |
getKey()
Retrieve the unique key of a record.
|
int |
numBytes()
Return the number of bytes of data in this record.
|
public NetricsRecord(java.lang.String key, java.lang.String[] fields, java.lang.String[] attr_names, java.lang.String[] attr_values)
key
- A unique (user-specified) identifier for the record.fields
- The actual content associated with the record, one String per field in the table. Use the empty sting ("") for a field with no data in it. A field may be no longer than 2^16-3.attr_names
- Names of attributes associated with this record.attr_values
- Values of attributes associated with this record, in the same order as attr_names.public NetricsRecord(java.lang.String key, java.lang.String[] fields)
key
- A unique (user-specified) identifier for the record.fields
- The actual content associated with the record, one String per field in the table. Use the empty sting ("") for a field with no data in it. A field may be no longer than 2^16-3.public java.lang.String getKey()
public int numBytes()
public java.lang.String[] getFields()
public java.lang.String[] getAttrNames()
public java.lang.String[] getAttrValues()
public java.lang.String getAttribute(java.lang.String attr_name)
attr_name
- Name of the attribute to retrieve.public java.lang.String compare(NetricsRecord rec)