Class LRUResultCache<T>
java.lang.Object
org.eclipse.rdf4j.spring.resultcache.LRUResultCache<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Clearable,ResultCache<Integer,T>
- Since:
- 4.0.0
- Author:
- Florian Kleedorfer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalling this method instructs the cache to returnnullto allResultCache.get(K)calls and ignore anyResultCache.put(K, T)calls from the current thread until the cache is cleared.voidvoidvoid
-
Constructor Details
-
LRUResultCache
-
-
Method Details
-
get
- Specified by:
getin interfaceResultCache<Integer,T>
-
put
- Specified by:
putin interfaceResultCache<Integer,T>
-
markDirty
public void markDirty() -
clearCachedResults
public void clearCachedResults()- Specified by:
clearCachedResultsin interfaceClearable
-
bypassForCurrentThread
public void bypassForCurrentThread()Description copied from interface:ResultCacheCalling this method instructs the cache to returnnullto allResultCache.get(K)calls and ignore anyResultCache.put(K, T)calls from the current thread until the cache is cleared. Context: after a write operation on a connection (which is assumed to be handled exclusively by a dedicated thread), the local cache must be cleared and the global cache bypassed until the connection is returned.- Specified by:
bypassForCurrentThreadin interfaceResultCache<Integer,T>
-