edu.uci.eecs.doc.clepsydra.cache
Class MethodCacheStrategy.HitRatio

java.lang.Object
  extended by edu.uci.eecs.doc.clepsydra.cache.MethodCacheStrategy.HitRatio
Enclosing interface:
MethodCacheStrategy

public static class MethodCacheStrategy.HitRatio
extends Object

A simple encapsulation of a cache hit ratio.

Author:
Trevor Harmon

Constructor Summary
MethodCacheStrategy.HitRatio(int hits, int misses)
          Creates a new hit ratio object.
 
Method Summary
 int getHits()
           
 int getMisses()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodCacheStrategy.HitRatio

public MethodCacheStrategy.HitRatio(int hits,
                                    int misses)
Creates a new hit ratio object. The number of hits plus the number of misses should add up to the total number of invocations.

Parameters:
hits - the number of guaranteed hits of this invocation
misses - the number of guaranteed misses of this invocation
Method Detail

getHits

public int getHits()

getMisses

public int getMisses()

toString

public String toString()
Overrides:
toString in class Object