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

    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

    clearCachedResults, markDirty
  • Method Details

    • get

      T get(K key)
    • put

      void put(K key, T cachedObject)
    • bypassForCurrentThread

      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.