Interface ResultCache<K,T>

Type Parameters:
K -
T -
All Superinterfaces:
Clearable
All Known Implementing Classes:
LRUResultCache

public interface ResultCache<K,T> extends Clearable
Since:
4.0.0
Author:
Florian Kleedorfer
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    Calling this method instructs the cache to return null to all get(K) calls and ignore any put(K, T) calls from the current thread until the cache is cleared.
    get(K key)
     
    void
    put(K key, T cachedObject)
     

    Methods inherited from interface org.eclipse.rdf4j.spring.resultcache.Clearable Link icon

    clearCachedResults, markDirty
  • Method Details Link icon

    • get Link icon

      T get(K key)
    • put Link icon

      void put(K key, T cachedObject)
    • bypassForCurrentThread Link icon

      void bypassForCurrentThread()
      Calling this method instructs the cache to return null to all get(K) calls and ignore any 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.