org.globus.mds.usefulrp
Class AccumulatorResourceProperty
java.lang.Object
org.globus.wsrf.impl.BaseResourceProperty
org.globus.wsrf.impl.ReflectionResourceProperty
org.globus.mds.usefulrp.AccumulatorResourceProperty
- All Implemented Interfaces:
- ResourceProperty
- public class AccumulatorResourceProperty
- extends ReflectionResourceProperty
An MDS ResourceProperty that will allow services to easily publish
metrics about their load.
This RP is specfically designed for measuring cumulative quantities
(such as number of hits, number of bytes transferred), with the
TODO ability to publish derived statistics such as average rate of
change of the accumulator (which will provide, for example,
hits/second or bytes/second).
Note that this RP implements no persistence (in order to have minimal
dependencies on other configuration) but will TODO indicate in its
output when it began making the present set of measurements.
|
Field Summary |
(package private) java.util.Date |
lastCalculation
keeps track of when we last performed decays. |
private static org.apache.commons.logging.Log |
logger
|
(package private) Accumulator |
publishedValue
The stub type that will be serialised to go over the wire. |
| Methods inherited from class org.globus.wsrf.impl.ReflectionResourceProperty |
add, clear, get, getValueSimple, initialize, isArray, isEmpty, iterator, remove, set, setObject, setPropertyName, size, toElements, toSOAPElements |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static org.apache.commons.logging.Log logger
publishedValue
Accumulator publishedValue
- The stub type that will be serialised to go over the wire.
lastCalculation
java.util.Date lastCalculation
- keeps track of when we last performed decays. This is different
from the output schema lastChange value.
AccumulatorResourceProperty
public AccumulatorResourceProperty(javax.xml.namespace.QName name)
throws java.lang.Exception
- Throws:
java.lang.Exception - passes along any exception encountered
during construction of underlying ReflectionResourceProperty.
getDynamicValue
public java.lang.Object getDynamicValue()
accumulate
public void accumulate(long amount)
performDecays
void performDecays(double q)