Skip to content
Snippets Groups Projects
Commit 4a774e2c authored by Tobias Pietzsch's avatar Tobias Pietzsch
Browse files

rename clearCache() to invalidateAll() (consistent with guava).

add javadoc
parent bd54529a
No related branches found
No related tags found
No related merge requests found
......@@ -243,10 +243,9 @@ public final class LoadingVolatileCache< K, V extends VolatileCacheValue > imple
* Remove all references to loaded data as well as all enqueued requests
* from the cache.
*/
public void clearCache()
public void invalidateAll()
{
// TODO: we should only clear out our own cache entries not the entire global cache!
cache.clearCache();
cache.invalidateAll();
prepareNextFrame();
// TODO: add a full clear to BlockingFetchQueues.
// (BlockingFetchQueues.clear() moves stuff to the prefetchQueue.)
......
......@@ -16,7 +16,10 @@ public interface WeakSoftCache< K, V >
*/
public void cleanUp();
public void clearCache();
/**
* Discards all entries in the cache.
*/
void invalidateAll();
public static < K, V > WeakSoftCache< K, V > getInstance()
{
......
......@@ -38,7 +38,7 @@ public class WeakSoftCacheImp< K, V > implements WeakSoftCache< K, V >
}
@Override
public void clearCache()
public void invalidateAll()
{
for ( final Reference< ? > ref : softReferenceCache.values() )
ref.clear();
......
......@@ -253,7 +253,7 @@ public class VolatileGlobalCellCache implements Cache
*/
public void clearCache()
{
volatileCache.clearCache();
volatileCache.invalidateAll();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment