org.sandev.basics.structs
Class StatsStruct

java.lang.Object
  extended by org.sandev.basics.structs.StatsStruct
Direct Known Subclasses:
Stats

public class StatsStruct
extends java.lang.Object

A structure for representing raw statistical information, stored as a sequence of attribute/values. Stats messages are typically broadcast by nodes maintaining runtime statistical values, in response to either changes in those values, a heartbeat, a query, or other triggering situations.

Aggregation of statistics is specific to each application. One possibility is to have a specific node instance on each server provide the aggregation function (eg StatAccumulator), with data flowing from the server accumulators to one or more aggregate accumulators, which in turn serve one or more reporting interfaces. The reporting interfaces retrieve the latest stats as needed for display, and/or subscribe for asynchronous notifications.

A Stats message is essentially an array of SandAttrVal instances, so each statistic has a name and a single value represented as a String. The intent is to allow for maximum flexibility with minimal change impact as the system is modified over time. It is up to the receiver to unpack what it knows how to use and ignore anything else. Stats are not appropriate for complex information structures. Where complex information strutures are necessary, a separate struct definition should be used.

This message can be transmitted directly outside of a verb form.
This message implements the AuthUser interface using email as the username.
This message has the following verb forms: query

Field Summary
protected  SandAttrVal[] data
          A collection of statistics represented in name/value form.
 
Constructor Summary
StatsStruct()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected SandAttrVal[] data
A collection of statistics represented in name/value form.

Constructor Detail

StatsStruct

public StatsStruct()