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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for loading nodes on cache miss.Method Summary
All MethodsModifier and TypeMethodDescriptionget(int key, NodeCache.Loader loader) Get a value from the cache, loading it if necessary.
Method Details
get
Get a value from the cache, loading it if necessary.- Parameters:
key- the cache keyloader- the loader to use if the key is not in cache- Returns:
- the cached or loaded value
- Throws:
IOException- if loading fails