net.java.dev.moskito.util.storage
Class StorageStats

java.lang.Object
  extended by net.java.dev.moskito.core.producers.AbstractStats
      extended by net.java.dev.moskito.util.storage.StorageStats
All Implemented Interfaces:
IStats

public class StorageStats
extends AbstractStats


Field Summary
private  StatValue containsKeyCalls
          Number of calls of the containsKey method.
private  StatValue containsKeyHits
          Number of calls of the containsKey method which returned true.
private  StatValue containsValueCalls
          Number of calls of the containsValue method.
private  StatValue containsValueHits
          Number of calls of the containsValue method which returned true.
private  StatValue gets
          Number of calls of the get method.
private  StatValue missedGets
          Nnumber of the calls of the get method which returned null.
private  String name
           
private  StatValue noopRemoves
          Number of remove calls which did no effect (no value for this key in the storage).
private  StatValue overwritePuts
          Number of calls to put which overwrote existing data.
private  StatValue puts
          Number of total calls to put.
private  StatValue removes
          Number of remove calls.
private  StatValue size
          Size of the storage.
 
Constructor Summary
StorageStats()
           
StorageStats(String name)
           
StorageStats(String aName, Interval[] selectedIntervals)
           
 
Method Summary
 void addContainsKeyHit()
           
 void addContainsKeyMiss()
           
 void addContainsValueHit()
           
 void addContainsValueMiss()
           
 void addGet()
           
 void addMissedGet()
           
 void addNoopRemove()
           
 void addOverwritePut()
           
 void addPut()
           
 void addRemove()
           
 void decreaseSize()
           
 long getContainsKeyCalls(String intervalName)
           
 double getContainsKeyHitRatio(String intervalName)
           
 long getContainsKeyHits(String intervalName)
           
 long getContainsValueCalls(String intervalName)
           
 double getContainsValueHitRatio(String intervalName)
           
 long getContainsValueHits(String intervalName)
           
 long getGets(String intervalName)
           
 double getHitGetRatio(String intervalName)
           
 double getMissedGetRatio(String intervalName)
           
 long getMissedGets(String intervalName)
           
 String getName()
           
 double getNewPutRatio(String intervalName)
           
 double getNoopRemoveRatio(String intervalName)
           
 long getNoopRemoves(String intervalName)
           
 double getOverwritePutRatio(String intervalName)
           
 long getOverwritePuts(String intervalName)
           
 double getPutGetRatio(String intervalName)
           
 double getPutRemoveRatio(String intervalName)
           
 long getPuts(String intervalName)
           
 long getRemoves(String intervalName)
           
 long getSize(String intervalName)
           
 void increaseSize()
           
 void setSize(int aSize)
           
 String toStatsString(String intervalName)
           
 
Methods inherited from class net.java.dev.moskito.core.producers.AbstractStats
createSnapshot, toStatsString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gets

private StatValue gets
Number of calls of the get method.


missedGets

private StatValue missedGets
Nnumber of the calls of the get method which returned null.


puts

private StatValue puts
Number of total calls to put.


overwritePuts

private StatValue overwritePuts
Number of calls to put which overwrote existing data.


removes

private StatValue removes
Number of remove calls.


noopRemoves

private StatValue noopRemoves
Number of remove calls which did no effect (no value for this key in the storage).


size

private StatValue size
Size of the storage. Tricky calculated on each operation, may differ from the real size.


containsKeyCalls

private StatValue containsKeyCalls
Number of calls of the containsKey method.


containsKeyHits

private StatValue containsKeyHits
Number of calls of the containsKey method which returned true.


containsValueCalls

private StatValue containsValueCalls
Number of calls of the containsValue method.


containsValueHits

private StatValue containsValueHits
Number of calls of the containsValue method which returned true.


name

private String name
Constructor Detail

StorageStats

public StorageStats()

StorageStats

public StorageStats(String name)

StorageStats

public StorageStats(String aName,
                    Interval[] selectedIntervals)
Method Detail

getName

public String getName()

toStatsString

public String toStatsString(String intervalName)

getNoopRemoveRatio

public double getNoopRemoveRatio(String intervalName)

getOverwritePutRatio

public double getOverwritePutRatio(String intervalName)

getNewPutRatio

public double getNewPutRatio(String intervalName)

getMissedGetRatio

public double getMissedGetRatio(String intervalName)

getHitGetRatio

public double getHitGetRatio(String intervalName)

getContainsKeyHitRatio

public double getContainsKeyHitRatio(String intervalName)

getContainsValueHitRatio

public double getContainsValueHitRatio(String intervalName)

getPutGetRatio

public double getPutGetRatio(String intervalName)

getPutRemoveRatio

public double getPutRemoveRatio(String intervalName)

addGet

public void addGet()

addMissedGet

public void addMissedGet()

addPut

public void addPut()

addOverwritePut

public void addOverwritePut()

increaseSize

public void increaseSize()

decreaseSize

public void decreaseSize()

setSize

public void setSize(int aSize)

addContainsKeyHit

public void addContainsKeyHit()

addContainsKeyMiss

public void addContainsKeyMiss()

addContainsValueHit

public void addContainsValueHit()

addContainsValueMiss

public void addContainsValueMiss()

addRemove

public void addRemove()

addNoopRemove

public void addNoopRemove()

getContainsKeyCalls

public long getContainsKeyCalls(String intervalName)

getContainsKeyHits

public long getContainsKeyHits(String intervalName)

getContainsValueCalls

public long getContainsValueCalls(String intervalName)

getContainsValueHits

public long getContainsValueHits(String intervalName)

getGets

public long getGets(String intervalName)

getMissedGets

public long getMissedGets(String intervalName)

getNoopRemoves

public long getNoopRemoves(String intervalName)

getOverwritePuts

public long getOverwritePuts(String intervalName)

getPuts

public long getPuts(String intervalName)

getRemoves

public long getRemoves(String intervalName)

getSize

public long getSize(String intervalName)


Copyright © 2006-2007 MoSKito Project Team. All Rights Reserved.
MoSKito, the open source java monitoring framework