| java.lang.Object org.apache.geronimo.monitoring.snapshot.SnapshotDBHelper
SnapshotDBHelper | public class SnapshotDBHelper (Code) | | |
Method Summary | |
public boolean | addSnapshotToDB(HashMap<String, HashMap<String, Long>> aggregateStats) | public ArrayList<HashMap<String, HashMap<String, Object>>> | fetchData(Integer numberOfSnapshot, Integer everyNthSnapshot) Fetches the data stored from the snapshot thread and returns
it in a ArrayList with each element being a HashMap of the attribute
mapping to the statistic. | public HashMap<String, HashMap<String, Long>> | fetchMaxSnapshotData(Integer numberOfSnapshots) Parameters: numberOfSnapshots - - the number of latest snapshots to look at A hashmap which maps an mbean --> a hashmap with an attribute name and its value . | public HashMap<String, HashMap<String, Long>> | fetchMinSnapshotData(Integer numberOfSnapshots) Parameters: numberOfSnapshots - - the number of latest snapshots to look at A hashmap which maps an mbean --> a hashmap with an attribute name and its value . | public HashMap<String, ArrayList<String>> | getAllSnapshotStatAttributes() | public Long | getSnapshotCount() | public TreeMap<Long, Long> | getSpecificStatistics(String mbeanName, String statsName, int numberOfSnapshots, int everyNthSnapshot, boolean showArchived) | public String | prepareInsertSnapshotStatement(String snapshot_time, String statsValueList, int mbeanId) | public void | setDataSources(DataSource active, DataSource archive) |
SnapshotDBHelper | public SnapshotDBHelper()(Code) | | |
addSnapshotToDB | public boolean addSnapshotToDB(HashMap<String, HashMap<String, Long>> aggregateStats)(Code) | | Parameters: ds - Parameters: aggregateStats - Returns a boolean if the snapshot statistics were successfully addedto the DB. |
fetchData | public ArrayList<HashMap<String, HashMap<String, Object>>> fetchData(Integer numberOfSnapshot, Integer everyNthSnapshot)(Code) | | Fetches the data stored from the snapshot thread and returns
it in a ArrayList with each element being a HashMap of the attribute
mapping to the statistic. Grabs 'numberOfSnapshots' snapshots. Grabs
one snapshot per 'everyNthsnapshot'
Parameters: numberOfSnapshot - Parameters: everyNthSnapshot - ArrayList |
fetchMaxSnapshotData | public HashMap<String, HashMap<String, Long>> fetchMaxSnapshotData(Integer numberOfSnapshots)(Code) | | Parameters: numberOfSnapshots - - the number of latest snapshots to look at A hashmap which maps an mbean --> a hashmap with an attribute name and its value . All values will be the max. |
fetchMinSnapshotData | public HashMap<String, HashMap<String, Long>> fetchMinSnapshotData(Integer numberOfSnapshots)(Code) | | Parameters: numberOfSnapshots - - the number of latest snapshots to look at A hashmap which maps an mbean --> a hashmap with an attribute name and its value . All values will be the min. |
getAllSnapshotStatAttributes | public HashMap<String, ArrayList<String>> getAllSnapshotStatAttributes()(Code) | | A map: mbeanName --> ArrayList of statistic attributes for that mbean |
getSnapshotCount | public Long getSnapshotCount()(Code) | | The number of snapshots present in the active database |
getSpecificStatistics | public TreeMap<Long, Long> getSpecificStatistics(String mbeanName, String statsName, int numberOfSnapshots, int everyNthSnapshot, boolean showArchived)(Code) | | Parameters: mbeanName - Parameters: statsName - Parameters: numberOfSnapshots - Parameters: everyNthSnapshot - HashMap which maps from a snapshot_time --> value of the mbean.statsName at that time |
prepareInsertSnapshotStatement | public String prepareInsertSnapshotStatement(String snapshot_time, String statsValueList, int mbeanId)(Code) | | Parameters: snapshot_time - Parameters: statsValueList - Parameters: mbeanId - Returns an SQL insert statement for one statistic given the correct information. |
setDataSources | public void setDataSources(DataSource active, DataSource archive)(Code) | | Sets the necessary data sources for this helper to talk to the db
Parameters: activeDS - Parameters: archiveDS - |
|
|