fiftyone.device.example.illustration
Class CachingConfiguration.GuavaCacheAdaptor<K,V>

java.lang.Object
  extended by fiftyone.device.example.illustration.CachingConfiguration.GuavaCacheAdaptor<K,V>
All Implemented Interfaces:
ICache<K,V>
Direct Known Subclasses:
CachingConfiguration.PutCacheAdaptor, CachingConfiguration.UaCacheAdaptor
Enclosing class:
CachingConfiguration

public static class CachingConfiguration.GuavaCacheAdaptor<K,V>
extends Object
implements ICache<K,V>


Nested Class Summary
 
Nested classes/interfaces inherited from interface fiftyone.mobile.detection.cache.ICache
ICache.Base<K,V>
 
Field Summary
protected  com.google.common.cache.Cache<K,V> cache
           
 
Constructor Summary
CachingConfiguration.GuavaCacheAdaptor(com.google.common.cache.Cache<K,V> cache)
           
 
Method Summary
 V get(K key)
           
 long getCacheMisses()
           
 long getCacheRequests()
           
 long getCacheSize()
           
 double getPercentageMisses()
           
 void resetCache()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected final com.google.common.cache.Cache<K,V> cache
Constructor Detail

CachingConfiguration.GuavaCacheAdaptor

public CachingConfiguration.GuavaCacheAdaptor(com.google.common.cache.Cache<K,V> cache)
Method Detail

get

public V get(K key)
Specified by:
get in interface ICache<K,V>

getCacheSize

public long getCacheSize()
Specified by:
getCacheSize in interface ICache<K,V>

getCacheMisses

public long getCacheMisses()
Specified by:
getCacheMisses in interface ICache<K,V>

getCacheRequests

public long getCacheRequests()
Specified by:
getCacheRequests in interface ICache<K,V>

getPercentageMisses

public double getPercentageMisses()
Specified by:
getPercentageMisses in interface ICache<K,V>

resetCache

public void resetCache()
Specified by:
resetCache in interface ICache<K,V>


Copyright © 2017 51Degrees. All rights reserved.