java.lang.Object
com.maxmind.db.NoCache
- All Implemented Interfaces:
NodeCache
Nested Class Summary
Nested classes/interfaces inherited from interface NodeCache
NodeCache.LoaderModifier and TypeInterfaceDescriptionstatic interfaceInterface for loading nodes on cache miss.Field Summary
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionget(int key, NodeCache.Loader loader) Get a value from the cache, loading it if necessary.static NoCacheGet the singleton instance.
Field Details
INSTANCE
The single instance, shared by every reader.
Constructor Details
NoCache
private NoCache()Utility class, not intended for instantiation.
Method Details
get
Description copied from interface:NodeCacheGet a value from the cache, loading it if necessary.- Specified by:
getin interfaceNodeCache- 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
getInstance