public class PerformanceHashtable extends atg.core.util.WrapperHashtable<java.lang.String,PerformanceData> implements NameContext, NameContextBindingListener
When endOperation is called, it gets the PerformanceStackData object. Some calculations are performed and then the totals are put into a PerformanceData object which is stored into this hashtable. The totals from this object are also added to the PerformanceData object contained within this object.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
Constructor and Description |
---|
PerformanceHashtable()
Constructs a PerformanceStack object.
|
PerformanceHashtable(int initialCapacity)
Constructs a PerformanceStack object.
|
PerformanceHashtable(int initialCapacity,
float loadFactor)
Constructs a PerformanceStack object.
|
Modifier and Type | Method and Description |
---|---|
PerformanceData |
get(java.lang.Object pKey) |
long |
getAverageExecutionTime() |
double |
getAverageMemoryRequired() |
java.lang.Object |
getElement(java.lang.String pName)
Returns the element bound to the specified name.
|
long |
getMaximumExecutionTime() |
double |
getMaximumMemoryRequired() |
long |
getMemTotalNumberOfExecutions() |
long |
getMinimumExecutionTime() |
double |
getMinimumMemoryRequired() |
java.lang.String |
getName()
Returns property name.
|
NameContext |
getNameContext()
Returns property nameContext.
|
PerformanceData |
getPerformanceTotals()
Returns property totals
|
long |
getTotalExecutionTime() |
double |
getTotalMemoryRequired() |
long |
getTotalNumberOfExecutions() |
void |
increaseTotalExecutionTime(long pTime)
Increases the totalExecutionTime in the global PerformanceData object by the amount in pTime.
|
void |
increaseTotalMemoryRequired(double pMemory)
Increases the totalMemoryRequired in the global PerformanceData object by the amount in pMemory.
|
boolean |
isElementBound(java.lang.String pName)
Returns true if the name has an element bound to it, false if
not.
|
java.util.Enumeration |
listElementNames()
Returns the list of element names as an Enumeration
|
java.util.Enumeration |
listElements()
Returns the list of bound elements as an Enumeration
|
void |
nameContextElementBound(NameContextBindingEvent pEvent)
This is called to notify this context that it is being bound into
a NameContext.
|
void |
nameContextElementUnbound(NameContextBindingEvent pEvent)
This is called to notify this context that it is being unbound
from a NameContext.
|
PerformanceData |
put(java.lang.String key,
PerformanceData value) |
void |
putElement(java.lang.String pName,
java.lang.Object pElement)
Binds the specified element to the specified name.
|
PerformanceData |
putIfAbsent(java.lang.String key,
PerformanceData value)
Calls through to our inner concurrent hashmap's put if absent.
|
PerformanceData |
remove(java.lang.String key) |
void |
removeElement(java.lang.String pName)
Removes the binding for the specified name.
|
void |
reset()
Resets the properties of all the PerformanceData objects contained within the hashtable.
|
void |
resetMemoryData()
Resets the memory properties of all the PerformanceData objects contained within the hashtable.
|
void |
setName(java.lang.String pName)
Sets property name.
|
void |
setNameContext(NameContext pNameContext)
Sets property nameContext.
|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, getWrapped, hashCode, isEmpty, keys, keySet, putAll, remove, size, toString, values
public PerformanceHashtable()
public PerformanceHashtable(int initialCapacity)
public PerformanceHashtable(int initialCapacity, float loadFactor)
public void increaseTotalExecutionTime(long pTime)
pTime
- the amount to increment totalExecutionTime by.public void increaseTotalMemoryRequired(double pMemory)
pMemory
- the amount to increment totalMemoryRequired by.public void reset()
public void resetMemoryData()
public PerformanceData getPerformanceTotals()
public void setName(java.lang.String pName)
public java.lang.String getName()
getName
in interface NameContextElement
public void setNameContext(NameContext pNameContext)
public NameContext getNameContext()
getNameContext
in interface NameContextElement
public PerformanceData get(java.lang.Object pKey)
get
in interface java.util.Map<java.lang.String,PerformanceData>
get
in class atg.core.util.WrapperHashtable<java.lang.String,PerformanceData>
public PerformanceData put(java.lang.String key, PerformanceData value)
put
in interface java.util.Map<java.lang.String,PerformanceData>
put
in class atg.core.util.WrapperHashtable<java.lang.String,PerformanceData>
public PerformanceData putIfAbsent(java.lang.String key, PerformanceData value)
putIfAbsent
in interface java.util.Map<java.lang.String,PerformanceData>
putIfAbsent
in class java.util.Hashtable<java.lang.String,PerformanceData>
public PerformanceData remove(java.lang.String key)
public java.lang.Object getElement(java.lang.String pName)
NameContext
getElement
in interface NameContext
public void putElement(java.lang.String pName, java.lang.Object pElement)
NameContext
putElement
in interface NameContext
public void removeElement(java.lang.String pName)
NameContext
removeElement
in interface NameContext
public boolean isElementBound(java.lang.String pName)
NameContext
isElementBound
in interface NameContext
public java.util.Enumeration listElementNames()
NameContext
listElementNames
in interface NameContext
public java.util.Enumeration listElements()
NameContext
listElements
in interface NameContext
public long getMinimumExecutionTime()
public long getMaximumExecutionTime()
public long getTotalNumberOfExecutions()
public long getTotalExecutionTime()
public long getAverageExecutionTime()
public long getMemTotalNumberOfExecutions()
public double getMinimumMemoryRequired()
public double getMaximumMemoryRequired()
public double getTotalMemoryRequired()
public double getAverageMemoryRequired()
public void nameContextElementBound(NameContextBindingEvent pEvent)
nameContextElementBound
in interface NameContextBindingListener
public void nameContextElementUnbound(NameContextBindingEvent pEvent)
nameContextElementUnbound
in interface NameContextBindingListener