com.cloudtran.jmx
Class TxSummaryHelper

java.lang.Object
  extended by com.cloudtran.jmx.JmxStatisticCalculator
      extended by com.cloudtran.jmx.TxSummaryHelper

public class TxSummaryHelper
extends JmxStatisticCalculator

The purpose of this class to help with the JMX reporting. The following values: TxCommitPerSecond TxCompletePerSecond RowsInsertedPerSecond RowsUpdatedPerSecond RowsDeletedPerSecond have to be calculated using the previous and the last TxSummary, but the JMX framework does not have a builtin helper solution for that. This class provides the memory to do the calculations. Warning: We are using longs to 'represent' doubles, so we cut down the fraction.


Field Summary
static Queue<Long> commitToGridTimes
           
static Queue<Double> diskWriteTimes
           
 
Constructor Summary
TxSummaryHelper(com.cloudtran.txb.AbstractTxBufferManager txBufferManager)
           
 
Method Summary
static void addCommitToGridTime(long timeToCommitToGridTime)
           
static void addToCommitTimes(long commitTime)
           
 DCAStatsResult getDCAStats()
          Get the results related to DistCommitOrAbort
 long getMovingAverage(Queue<Long> data)
           
 TxResult getResults()
          Get the results related to TxSummary
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

diskWriteTimes

public static Queue<Double> diskWriteTimes

commitToGridTimes

public static Queue<Long> commitToGridTimes
Constructor Detail

TxSummaryHelper

public TxSummaryHelper(com.cloudtran.txb.AbstractTxBufferManager txBufferManager)
Method Detail

getResults

public TxResult getResults()
Get the results related to TxSummary

Returns:
The performance statistics for the transaction subsystem.

getMovingAverage

public long getMovingAverage(Queue<Long> data)

addCommitToGridTime

public static void addCommitToGridTime(long timeToCommitToGridTime)

addToCommitTimes

public static void addToCommitTimes(long commitTime)

getDCAStats

public DCAStatsResult getDCAStats()
Get the results related to DistCommitOrAbort

Returns:
The performance statistics.

main

public static void main(String[] args)