Interface CacheRegistry


@Deprecated(since="5.0", forRemoval=true) public interface CacheRegistry
Deprecated, for removal: This API element is subject to removal in a future version.
since 5.0
Keeps an information about relationship between a type and a key. One key can depend on several types, and multiple keys can be "registered" on a single type. Registry allows to perform bulk invalidation of multiple keys using a single type. Registry implementations must be thread safe (there's no external synchronization!)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clears registry.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Handles eviction, that is a removal of a single key.
    invalidate(Object typeCode)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Invalidates a single typeCode in the registry.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Registers a RegistrableCacheKey in the registry using every typeCode the key depends on.
  • Method Details

    • register

      void register(RegistrableCacheKey key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Registers a RegistrableCacheKey in the registry using every typeCode the key depends on. See: RegistrableCacheKey.getDependentTypes()
    • invalidate

      Collection<RegistrableCacheKey> invalidate(Object typeCode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Invalidates a single typeCode in the registry.
      We are not removing entries (queries) from registry in this method. Because we cannot be sure if isAllowInvalidation() in cache controller actually allows to remove it from region.
      Returns:
      A collection of keys that have been registered on given typeCode prior to invalidation.
    • evict

      void evict(RegistrableCacheKey key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Handles eviction, that is a removal of a single key.
    • clear

      void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears registry. After this method completes, registry does not contain any mappings.