Interface MetadataCache<U>
- Type Parameters:
U- The metadata type.
- All Known Implementing Classes:
AbstractMetadataCache,BatchMetadataCache,DynamicMetadataCache,FetchThroughMetadataCache
public interface MetadataCache<U>
A cache for loading, storing, and retrieving metadata against against the supplied
CriteriaSet.
Implementations can choose the specific cache semantics implemented e.g. read-through, refresh-ahead etc. as well as storage/eviction strategies.
Implementations are intended to be access concurrently, and therefore are required to be thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanclearAll()Clear all entries from the cache.get(CriteriaSet criteria) Get the list of metadata matching the given identifier.
-
Method Details
-
clearAll
default boolean clearAll()Clear all entries from the cache.The default, for implementations that do not override this method, is false: the cache has not been cleared.
The implementing method is required to be thread safe.
- Returns:
- true if the clear operation completed successfully, false if it failed. Running successfully does not necessarily mean all entries have been removed from the cache; that depends on the cache implementation.
- Since:
- 3.4.0 TODO: remove the default in 4.0.0