|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.infoservice.AbstractDatabaseEntry anon.infoservice.PerformanceEntry
public class PerformanceEntry
A PerformanceEntry
stores various performance-related data
such as average speed or delay about a certain MixCascade
.
Nested Class Summary | |
---|---|
static class |
PerformanceEntry.Bound
|
static class |
PerformanceEntry.PerformanceAttributeEntry
An entry that holds values of performance attributes. |
private static class |
PerformanceEntry.PerformanceAttributeFloatingTimeEntry
The floating time entry. |
static class |
PerformanceEntry.StabilityAttributes
|
Field Summary | |
---|---|
private static java.lang.String[] |
ATTRIBUTES
Text representation of the performance attributes. |
private static double |
BOUND_ROUNDING
Remove the worst x% results. |
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. |
private boolean |
m_bPassive
|
private java.util.Calendar |
m_current
A calendar used for date calculations. |
private PerformanceEntry.PerformanceAttributeEntry[][][] |
m_entries
The attribute entries. |
private PerformanceEntry.PerformanceAttributeFloatingTimeEntry[] |
m_floatingTimeEntries
The floating time entry. |
private int[] |
m_lastTestAverage
The average entries of the last test. |
private long |
m_lastTestTime
The time of the last performed test. |
private long |
m_lastUpdate
The time of the last update. |
private long |
m_serial
The serial of the database entry. |
private PerformanceEntry.StabilityAttributes |
m_stabilityAttributes
|
private java.lang.String |
m_strCascadeId
The id of the associated cascade. |
static long |
ONE_DAY_TIMEOUT
|
static int |
PACKETS
Current users attribute. |
private static int |
PERFORMANCE_ENTRY_TTL
Time-to-live of the performance entries. |
static int |
SPEED
Speed attribute. |
static int |
USERS
Current users attribute. |
static long |
WEEK_SEVEN_DAYS_TIMEOUT
|
private static java.lang.String |
XML_ATTR_ID
The cascade id attribute name. |
static java.lang.String |
XML_ELEMENT_CONTAINER_NAME
The entry's container XML element name. |
private static java.lang.String |
XML_ELEMENT_DATA
The data XML element name. |
static java.lang.String |
XML_ELEMENT_NAME
The XML element name. |
Fields inherited from class anon.infoservice.AbstractDatabaseEntry |
---|
XML_ATTR_LAST_UPDATE, XML_LAST_UPDATE |
Fields inherited from interface anon.util.IXMLEncodable |
---|
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_LANGUAGE, XML_ATTR_VERSION |
Constructor Summary | |
---|---|
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 . |
Method Summary | |
---|---|
int |
addData(int a_attribute,
java.util.Hashtable a_data)
Adds a hashtable of values into the entry array. |
private PerformanceEntry.PerformanceAttributeEntry |
addPerformanceAttributeEntry(int a_attribute,
long a_timestamp,
int a_value,
boolean a_bImport)
|
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. |
private long |
getDayTimestamp(int a_attribute,
int a_dayOfWeek)
Determines the day timestamp of the oldest entry of specified performance 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. |
private java.lang.String |
toHTML(int a_attribute,
java.lang.String a_unit,
int a_selectedDay)
Constructs a HTML table of the specified performance attribute on the a certain day. |
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. |
Methods inherited from class anon.infoservice.AbstractDatabaseEntry |
---|
deletePersistence, getCreationTime, getExpireTime, isNewerThan, isPersistanceDeletionAllowed, isUserDefined, resetCreationTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long WEEK_SEVEN_DAYS_TIMEOUT
public static final long ONE_DAY_TIMEOUT
private static final double BOUND_ROUNDING
public static final java.lang.String XML_ELEMENT_CONTAINER_NAME
public static final java.lang.String XML_ELEMENT_NAME
private static final java.lang.String XML_ELEMENT_DATA
private static final java.lang.String XML_ATTR_ID
public static final long LAST_TEST_DATA_TTL
private static final int PERFORMANCE_ENTRY_TTL
public static final int SPEED
public static final int DELAY
public static final int USERS
public static final int PACKETS
private static final java.lang.String[] ATTRIBUTES
public static final int[][] BOUNDARIES
private java.lang.String m_strCascadeId
private java.util.Calendar m_current
private long m_lastUpdate
private long m_serial
private boolean m_bPassive
private long m_lastTestTime
private PerformanceEntry.StabilityAttributes m_stabilityAttributes
private PerformanceEntry.PerformanceAttributeEntry[][][] m_entries
private PerformanceEntry.PerformanceAttributeFloatingTimeEntry[] m_floatingTimeEntries
private int[] m_lastTestAverage
Constructor Detail |
---|
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.Method Detail |
---|
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)
private PerformanceEntry.PerformanceAttributeEntry addPerformanceAttributeEntry(int a_attribute, long a_timestamp, int a_value, boolean a_bImport)
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.
private long getDayTimestamp(int a_attribute, int a_dayOfWeek)
a_attribute
- The performance attribute.a_dayOfWeek
- The day of the week.
private java.lang.String toHTML(int a_attribute, java.lang.String a_unit, int a_selectedDay)
a_attribute
- The performance attribute.a_unit
- The unit of the attribute.a_selectedDay
- The day.
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a document
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |