All Known Implementing Classes:
CHMCache, NoCache

public interface NodeCache
Interface for caching nodes during MaxMind database lookups. Provides a way to cache frequently accessed nodes to improve performance.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Interface for loading nodes on cache miss.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    get(int key, NodeCache.Loader loader)
    Get a value from the cache, loading it if necessary.
  • Method Details

    • get

      Object get(int key, NodeCache.Loader loader) throws IOException
      Get a value from the cache, loading it if necessary.
      Parameters:
      key - the cache key
      loader - the loader to use if the key is not in cache
      Returns:
      the cached or loaded value
      Throws:
      IOException - if loading fails