Interface MetadataCache<U>

  • Type Parameters:
    U - The metadata type.

    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. and storage/eviction strategies.

    Implementations are intended to be access concurrently, and therefore are required to be thread-safe.

    • Method Detail

      • get

        @Nonnull
        @NonnullElements
        List<U> get​(@Nonnull @NotEmpty
                    CriteriaSet criteria)
             throws MetadataCacheException
        Get the list of metadata matching the given identifier.

        The implementing method is required to be thread safe.

        Parameters:
        criteria - the criteria to use when getting the metadata from the cache or the source.
        Returns:
        a list of metadata matching the criteria.
        Throws:
        MetadataCacheException - on error fetching metadata.