Commit 6ef17681 authored by ncampbell's avatar ncampbell

remove jrobin annontations from messenger src...these will be

reintroduced through jrobin library later on.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/branches@2943 b35dd754-fafc-0310-a699-88a17e54d16e
parent b0c28a5c
/**
*
*/
package org.jrobin.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Noah Campbell
* @version 1.0
*/
@Target(value=ElementType.TYPE)
@Retention(value=RetentionPolicy.RUNTIME)
public @interface Arc {
/**
* The data is also consolidated with the consolidation function (CF) of the
* archive. The following consolidation functions are defined:
* AVERAGE, MIN, MAX, LAST.
* @return confun The standard consolidation functions (AVERAGE, MIN, MAX, LAST) for the archive.
*/
ConsolidationFunction consolidationFunction();
/**
* xff The xfiles factor defines what part of a consolidation interval may
* be made up from *UNKNOWN* data while the consolidated value is still
* regarded as known.
*
* @return xff
*/
double xff();
/**
* steps defines how many of these primary data points are used to build a
* consolidated data point which then goes into the archive.
* @return steps
*/
int steps();
/**
* rows defines how many generations of data values are kept in an RRA.
* @return rows
*/
int rows();
}
/**
*
*/
package org.jrobin.annotations;
/**
* @author Noah Campbell
* @version 1.0
*/
public enum ConsolidationFunction {
/** The AVERAGE. */
AVERAGE,
/** The MIN. */
MIN,
/** The MAX. */
MAX,
/** The LAST. */
LAST
}
/**
*
*/
package org.jrobin.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Noah Campbell
* @version 1.0
*/
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value={ElementType.METHOD})
public @interface Ds {
/**
* Name is the name you will use to reference this particular data source
* from an RRD. A ds-name must be 1 to 19 characters long in the
* characters [a-zA-Z0-9_].
* @return name
*/
String name();
/**
* <em>type</em> defines the Data Source Type. See the section on
* ``How to Measure'' below for further insight. The Datasource Type must
* be one of the following:</p>
* <dl>
*
* @return sourceType
*/
SourceType type() default SourceType.COUNTER;
/**
* heartbeat defines the maximum number of seconds that may pass between two
* updates of this data source before the value of the data source is
* assumed to be *UNKNOWN*.
*/
long heartbeat() default 600;
/**
* min and max are optional entries defining the expected range of the data
* supplied by this data source. If min and/or max are defined, any value
* outside the defined range will be regarded as *UNKNOWN*. If you do not
* know or care about min and max, set them to U for unknown.
* Note that min and max always refer to the processed values of the DS.
* For a traffic-COUNTER type DS this would be the max and min data-rate
* expected from the device.
*/
double minValue() default Double.MIN_VALUE;
/**
* @see #minValue()
* @return maxValue
*/
double maxValue() default Double.MAX_VALUE;
/**
* A XPath expression that defines how the data is collected from the object
* model. This is bean notion with a few exceptions. The attributes from
* the mbean server are upper case for the first character (as opposed to
* first letter lower case. Composite data are the exact string value as
* they are stored.
*
* For example: MBeanAttribute/composite/foo/bar/baz would lookup the attribute
* named MBeanAttribute (invoking the getAttribute on the server). Composite
* would call CompositeData.getField(<i>literal</i>). If the field is an object
* than the object graph is traversed with the rules defined in JXPath.
*
* The result should always be a number (short, long, double, float and the
* appropriate Object types). If it's not a number, 0 is returned.
*
* If no expression is given, then it's assumed that the name of the data source
* is the attribute on the ObjectName that it references.
*
* @see "JXPath"
* @return expression
*/
String expr() default "";
}
/**
*
*/
package org.jrobin.annotations;
/**
* Marker interface for Rrd#override()
*
* @author Noah Campbell
* @version 1.0
*/
public interface None {
}
/**
*
*/
package org.jrobin.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Noah Campbell
* @version 1.0
*/
@Target(value=ElementType.TYPE)
@Retention(value=RetentionPolicy.RUNTIME)
public @interface Rrd {
/**
* RRD gets fed samples at arbitrary times. From these it builds Primary
* Data Points (PDPs) at exact times every ``step'' interval. The PDPs are
* then accumulated into RRAs.
*
* <b>Note:</b> Changing this value from its default of 300 will impact the
* storage of the default archives.
*
* @return steps Number of seconds between expected reads.
*/
long step() default 300;
/**
* The class that this Rrd overrides.
* @return cls
*/
Class override() default None.class;
/**
* Archives to be associated with this rrd, beyond the Ds defined.
* @return archives The standard type of archives.
*
* This will be explained later on. The time in-between samples is 300
* seconds, a good starting point, which is the same as five minutes.
*
* 1 sample "averaged" stays 1 period of 5 minutes
* 6 samples averaged become one average on 30 minutes
* 24 samples averaged become one average on 2 hours
* 288 samples averaged become one average on 1 day
*
* <b>Note:</b> Changing the default step will have an impact on the archives that are
* created.
*/
Arc[] archives() default {@Arc(consolidationFunction=ConsolidationFunction.AVERAGE, xff=0.5, steps=1, rows=600),
@Arc(consolidationFunction=ConsolidationFunction.AVERAGE, xff=0.5, steps=5, rows=700),
@Arc(consolidationFunction=ConsolidationFunction.AVERAGE, xff=0.5, steps=24, rows=775),
@Arc(consolidationFunction=ConsolidationFunction.AVERAGE, xff=0.5, steps=288, rows=797),
@Arc(consolidationFunction=ConsolidationFunction.MAX, xff=0.5, steps=1, rows=600),
@Arc(consolidationFunction=ConsolidationFunction.MAX, xff=0.5, steps=5, rows=700),
@Arc(consolidationFunction=ConsolidationFunction.MAX, xff=0.5, steps=24, rows=775),
@Arc(consolidationFunction=ConsolidationFunction.MAX, xff=0.5, steps=288, rows=797),
@Arc(consolidationFunction=ConsolidationFunction.MIN, xff=0.5, steps=1, rows=600),
@Arc(consolidationFunction=ConsolidationFunction.MIN, xff=0.5, steps=5, rows=700),
@Arc(consolidationFunction=ConsolidationFunction.MIN, xff=0.5, steps=24, rows=775),
@Arc(consolidationFunction=ConsolidationFunction.MIN, xff=0.5, steps=288, rows=797)};
}
/**
*
*/
package org.jrobin.annotations;
/**
* @author Noah Campbell
* @version 1.0
*/
public enum SourceType {
/**
* </dd><dt><strong><a name="item_COUNTER"><strong>COUNTER</strong></a></strong><br>
* </dt><dd>is for continuous incrementing counters like the InOctets counter in a router. The <strong>COUNTER</strong>
* data source assumes that the counter never decreases, except when a
* counter overflows. The update function takes the overflow into account.
* The counter is stored as a per-second rate. When the counter overflows,
* RRDtool checks if the overflow happened at the 32bit or 64bit border
* and acts accordingly by adding an appropriate value to the result. <p></p>
*/
COUNTER,
/**
* <dt><strong><a name="item_GAUGE"><strong>GAUGE</strong></a></strong><br>
* </dt><dd>is for things like temperatures or number of people in a room or value of a RedHat share.
* <p></p>
*/
GAUGE,
/**
* </dd><dt><strong><a name="item_DERIVE"><strong>DERIVE</strong></a></strong><br>
* </dt><dd>will store the derivative of the line going from the last to
* the current value of the data source. This can be useful for gauges,
* for example, to measure the rate of people entering or leaving a room.
* Internally, derive works exaclty like COUNTER but without overflow
* checks. So if your counter does not reset at 32 or 64 bit you might
* want to use DERIVE and combine it with a MIN value of 0. <p></p>
*/
DERIVE,
/**
* </dd><dt><strong><a name="item_ABSOLUTE"><strong>ABSOLUTE</strong></a></strong><br>
* </dt><dd>is for counters which get reset upon reading. This is used for
* fast counters which tend to overflow. So instead of reading them
* normally you reset them after every read to make sure you have a
* maximal time available before the next overflow. Another usage is for
* things you count like number of messages since the last update.
*/
ABSOLUTE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment