org.modeshape.graph.connector.path.cache
Class DefaultCacheStatistics
java.lang.Object
org.modeshape.graph.connector.path.cache.DefaultCacheStatistics
- All Implemented Interfaces:
- CacheStatistics
@ThreadSafe
public final class DefaultCacheStatistics
- extends Object
- implements CacheStatistics
Default, thread-safe implementation of CacheStatistics
that uses AtomicLongs
as counters for the
statistics.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCacheStatistics
public DefaultCacheStatistics()
getWrites
public long getWrites()
- Specified by:
getWrites
in interface CacheStatistics
- Returns:
- the number of times that a node was written to the cache
getHits
public long getHits()
- Specified by:
getHits
in interface CacheStatistics
- Returns:
- the number of times that a node was retrieved from the cache
getMisses
public long getMisses()
- Specified by:
getMisses
in interface CacheStatistics
- Returns:
- the number of times that an attempt to retrieve a node from the cache failed because the node was not yet in the
cache.
getExpirations
public long getExpirations()
- Specified by:
getExpirations
in interface CacheStatistics
- Returns:
- the number of times that an attempt to retrieve a node from the cache failed because the node had previously been
placed in the cache, but the time to live for the node in the cache had expired
incrementWrites
public long incrementWrites()
incrementHits
public long incrementHits()
incrementMisses
public long incrementMisses()
incrementExpirations
public long incrementExpirations()
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.