
Quoting [Ceriel Jacobs] (Dec 13 2007):
Andre Merzky wrote:
Quoting [Ceriel Jacobs] (Dec 13 2007):
But, I just noticed another one: in the monitoring package, metric class, there is a sentence that states that
The metric |type|s are the same as defined for attributes, and the metric |value|s are to be formatted as described for the respective attribute types.
Ah, well, finite + n ... ;-)
But what about the Trigger type? This is not mentioned as one of the attribute types. In fact, it is never really specified what a 'Trigger' is.
Ah, good one, will fix that. In short: 'Checkpoint' would be a good example for a trigger. Its not boolean: you never notify an application 'Do no checkpoint now!' - but you use the metric to trigger a checkpoint 'Checkpoint now!'. I guess this is equivalent to an attribute who's existence or absence carries semantic meaning (e.g. 'Checkpointable'). That, however, maps pretty nicely to boolean attributes in all cases I can think of ('Checkpointable=yes').
I think a Trigger is a metric that has no value (or just a single value) but that may get fired (read: the registered callbacks are called). This indeed maps nicely to boolean attributes, with a "fire" when the value changes to "true". But I also think the value is immaterial. Maybe the getAttribute("Value") method should throw an exception when the metric is of type "Trigger"? Then you don't have to think about the attribute type of a "Trigger".
Good point, the actual value is indeed immaterial. Will do that, thanks! Andre.
Ceriel
-- No trees were destroyed in the sending of this message, however, a significant number of electrons were terribly inconvenienced.