org.apache.openjpa.datacache
Class CacheStatistics.Default

java.lang.Object
  extended by org.apache.openjpa.datacache.CacheStatistics.Default
All Implemented Interfaces:
Serializable, CacheStatistics
Enclosing interface:
CacheStatistics

public static class CacheStatistics.Default
extends Object
implements CacheStatistics

A default implementation.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.openjpa.datacache.CacheStatistics
CacheStatistics.Default
 
Constructor Summary
CacheStatistics.Default()
           
 
Method Summary
(package private)  void disable()
           
(package private)  void enable()
           
 long getHitCount()
          Gets number of total read requests that has been found in cache since last reset.
 long getHitCount(Class c)
          Gets number of total read requests that has been found in cache for the given class since last reset.
 long getReadCount()
          Gets number of total read requests since last reset.
 long getReadCount(Class c)
          Gets number of total read requests for the given class since last reset.
 long getTotalHitCount()
          Gets number of total read requests that has been found in cache since start.
 long getTotalHitCount(Class c)
          Gets number of total read requests that has been found in cache for the given class since start.
 long getTotalReadCount()
          Gets number of total read requests since start.
 long getTotalReadCount(Class c)
          Gets number of total read requests for the given class since start.
 long getTotalWriteCount()
          Gets number of total write requests since start.
 long getTotalWriteCount(Class c)
          Gets number of total write requests for the given class since start.
 long getWriteCount()
          Gets number of total write requests since last reset.
 long getWriteCount(Class c)
          Gets number of total write requests for the given class since last reset.
 boolean isEnabled()
          Returns whether or not statistics will be collected.
(package private)  void newGet(Class cls, boolean hit)
           
(package private)  void newPut(Class cls)
           
 void reset()
          Clears all accumulated statistics.
 Date since()
          Gets the time of last reset.
 Date start()
          Gets the time of start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheStatistics.Default

public CacheStatistics.Default()
Method Detail

getReadCount

public long getReadCount()
Description copied from interface: CacheStatistics
Gets number of total read requests since last reset.

Specified by:
getReadCount in interface CacheStatistics

getHitCount

public long getHitCount()
Description copied from interface: CacheStatistics
Gets number of total read requests that has been found in cache since last reset.

Specified by:
getHitCount in interface CacheStatistics

getWriteCount

public long getWriteCount()
Description copied from interface: CacheStatistics
Gets number of total write requests since last reset.

Specified by:
getWriteCount in interface CacheStatistics

getTotalReadCount

public long getTotalReadCount()
Description copied from interface: CacheStatistics
Gets number of total read requests since start.

Specified by:
getTotalReadCount in interface CacheStatistics

getTotalHitCount

public long getTotalHitCount()
Description copied from interface: CacheStatistics
Gets number of total read requests that has been found in cache since start.

Specified by:
getTotalHitCount in interface CacheStatistics

getTotalWriteCount

public long getTotalWriteCount()
Description copied from interface: CacheStatistics
Gets number of total write requests since start.

Specified by:
getTotalWriteCount in interface CacheStatistics

getReadCount

public long getReadCount(Class c)
Description copied from interface: CacheStatistics
Gets number of total read requests for the given class since last reset.

Specified by:
getReadCount in interface CacheStatistics

getHitCount

public long getHitCount(Class c)
Description copied from interface: CacheStatistics
Gets number of total read requests that has been found in cache for the given class since last reset.

Specified by:
getHitCount in interface CacheStatistics

getWriteCount

public long getWriteCount(Class c)
Description copied from interface: CacheStatistics
Gets number of total write requests for the given class since last reset.

Specified by:
getWriteCount in interface CacheStatistics

getTotalReadCount

public long getTotalReadCount(Class c)
Description copied from interface: CacheStatistics
Gets number of total read requests for the given class since start.

Specified by:
getTotalReadCount in interface CacheStatistics

getTotalHitCount

public long getTotalHitCount(Class c)
Description copied from interface: CacheStatistics
Gets number of total read requests that has been found in cache for the given class since start.

Specified by:
getTotalHitCount in interface CacheStatistics

getTotalWriteCount

public long getTotalWriteCount(Class c)
Description copied from interface: CacheStatistics
Gets number of total write requests for the given class since start.

Specified by:
getTotalWriteCount in interface CacheStatistics

since

public Date since()
Description copied from interface: CacheStatistics
Gets the time of last reset.

Specified by:
since in interface CacheStatistics

start

public Date start()
Description copied from interface: CacheStatistics
Gets the time of start.

Specified by:
start in interface CacheStatistics

reset

public void reset()
Description copied from interface: CacheStatistics
Clears all accumulated statistics.

Specified by:
reset in interface CacheStatistics

isEnabled

public boolean isEnabled()
Description copied from interface: CacheStatistics
Returns whether or not statistics will be collected.

Specified by:
isEnabled in interface CacheStatistics

enable

void enable()

disable

void disable()

newGet

void newGet(Class cls,
            boolean hit)

newPut

void newPut(Class cls)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.