public class PerformanceEntry extends AbstractDatabaseEntry implements IXMLEncodable
PerformanceEntry
stores various performance-related data
such as average speed or delay about a certain MixCascade
.Modifier and Type | Class and Description |
---|---|
static class |
PerformanceEntry.Bound |
static class |
PerformanceEntry.PerformanceAttributeEntry
An entry that holds values of performance attributes.
|
static class |
PerformanceEntry.StabilityAttributes |
Modifier and Type | Field and Description |
---|---|
static int[][] |
BOUNDARIES
The boundaries used to calculate the speed and delay bounds.
|
static int |
DELAY
Delay attribute.
|
static long |
LAST_TEST_DATA_TTL
Time-to-live of the last-test-data display.
|
static long |
ONE_DAY_TIMEOUT |
static int |
PACKETS
Current users attribute.
|
static int |
SPEED
Speed attribute.
|
static int |
USERS
Current users attribute.
|
static long |
WEEK_SEVEN_DAYS_TIMEOUT |
static java.lang.String |
XML_ELEMENT_CONTAINER_NAME
The entry's container XML element name.
|
static java.lang.String |
XML_ELEMENT_NAME
The XML element name.
|
XML_ATTR_LAST_UPDATE, XML_LAST_UPDATE
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
Constructor and Description |
---|
PerformanceEntry(org.w3c.dom.Element a_entry)
Constructs a new
PerformanceEntry from its XML representation. |
PerformanceEntry(java.lang.String a_strCascadeId)
Constructs a new
PerformanceEntry for the given MixCascade . |
PerformanceEntry(java.lang.String a_strCascadeId,
boolean a_bPassive)
Constructs a new
PerformanceEntry for the given MixCascade . |
Modifier and Type | Method and Description |
---|---|
int |
addData(int a_attribute,
java.util.Hashtable a_data)
Adds a hashtable of values into the entry array.
|
java.lang.String |
delayToHTML(int day)
Returns the delay values of a specified day as HTML table.
|
int |
getAverage(int a_attribute)
Returns the average value of the give attribute.
|
int |
getBestBound(int a_attribute)
Calculates (if used by the info service) and returns the
best bound value of the given attribute.
|
PerformanceEntry.Bound |
getBound(int a_attribute)
Calculates (if used by the info service) and returns the
bound value of the given attribute.
|
java.lang.String |
getId()
Returns a unique ID for a database entry.
|
int |
getLastTestAverage(int a_attribute)
Returns the average value from the last performed test.
|
long |
getLastTestTime()
Returns the time of the last test.
|
long |
getLastUpdate()
Returns the time in milliseconds when this db entry was created from the origin instance.
|
PerformanceEntry.StabilityAttributes |
getStabilityAttributes()
Returns errors resets, unknown requests and total requests for floating entries.
|
long |
getVersionNumber()
Returns version number which is used to determine the more recent infoservice entry, if two
entries are compared (higher version number -> more recent entry).
|
PerformanceEntry.PerformanceAttributeEntry |
importValue(int a_attribute,
long a_timestamp,
int a_value)
Imports a value into the entry array.
|
void |
setBestBound(int a_attribute,
int a_lValue)
Sets the best bound value.
|
void |
setBound(int a_attribute,
PerformanceEntry.Bound a_lValue)
Sets the bound value.
|
void |
setStabilityAttributes(PerformanceEntry.StabilityAttributes a_attributes) |
java.lang.String |
speedToHTML(int day)
Returns the speed values of a specified day as HTML table.
|
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.
|
PerformanceEntry |
update(PerformanceEntry a_entry) |
java.util.Vector |
updateHourlyPerformanceAttributeEntries(long a_timestamp) |
java.lang.String |
usersToHTML(int day)
Returns the users values of a specified day as HTML table.
|
deletePersistence, getCreationTime, getExpireTime, isNewerThan, isPersistanceDeletionAllowed, isUserDefined, resetCreationTime, setExpireTime
public static final long WEEK_SEVEN_DAYS_TIMEOUT
public static final long ONE_DAY_TIMEOUT
public static final java.lang.String XML_ELEMENT_CONTAINER_NAME
public static final java.lang.String XML_ELEMENT_NAME
public static final long LAST_TEST_DATA_TTL
public static final int SPEED
public static final int DELAY
public static final int USERS
public static final int PACKETS
public static final int[][] BOUNDARIES
public PerformanceEntry(java.lang.String a_strCascadeId)
PerformanceEntry
for the given MixCascade
.a_strCascadeId
- The id of the mix cascade.public PerformanceEntry(java.lang.String a_strCascadeId, boolean a_bPassive)
PerformanceEntry
for the given MixCascade
.a_strCascadeId
- The id of the mix cascade.a_bInfoService
- Specifies if the caller of this method is an InfoService
or the JAP client.public PerformanceEntry(org.w3c.dom.Element a_entry) throws XMLParseException
PerformanceEntry
from its XML representation.a_entry
- The XML data.XMLParseException
- If the XML data is invalid.public java.lang.String getId()
AbstractDatabaseEntry
getId
in class AbstractDatabaseEntry
public long getLastUpdate()
AbstractDatabaseEntry
getLastUpdate
in class AbstractDatabaseEntry
public long getVersionNumber()
AbstractDatabaseEntry
getVersionNumber
in class AbstractDatabaseEntry
public long getLastTestTime()
public PerformanceEntry.PerformanceAttributeEntry importValue(int a_attribute, long a_timestamp, int a_value)
a_attribute
- The performance attribute.a_timestamp
- The time stamp of the value.a_value
- The value itself.public PerformanceEntry update(PerformanceEntry a_entry)
public java.util.Vector updateHourlyPerformanceAttributeEntries(long a_timestamp)
public int addData(int a_attribute, java.util.Hashtable a_data)
a_attribute
- The performance attribute.a_data
- The data hashtable.public int getLastTestAverage(int a_attribute)
a_attribute
- The performance attribute.public void setStabilityAttributes(PerformanceEntry.StabilityAttributes a_attributes)
public void setBound(int a_attribute, PerformanceEntry.Bound a_lValue)
a_attribute
- The performance attribute.a_lValue
- The bound value.PerformanceInfo.getLowestCommonBoundEntry(String)
public void setBestBound(int a_attribute, int a_lValue)
a_attribute
- The performance attribute.a_lValue
- The best bound value.PerformanceInfo.getLowestCommonBoundEntry(String)
public PerformanceEntry.Bound getBound(int a_attribute)
a_attribute
- The performance attribute.public PerformanceEntry.StabilityAttributes getStabilityAttributes()
public int getBestBound(int a_attribute)
a_attribute
- The performance attribute.public int getAverage(int a_attribute)
a_attribute
- The performance attribute.public java.lang.String delayToHTML(int day)
day
- The day.public java.lang.String speedToHTML(int day)
day
- The day.public java.lang.String usersToHTML(int day)
day
- The day.public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a documentCopyright © 2023. All rights reserved.