Interface CacheRegion

    • Method Detail

      • get

        java.lang.Object get​(CacheKey key)
        Gets value from the cache. If value is absent returns null. Must be thread safe.
      • invalidate

        java.lang.Object invalidate​(CacheKey key,
                                    boolean fireEventsEvenIfNotRemoved)
        Invalidates (removes) value from cache map. Must be thread safe.
        Parameters:
        fireEventsEvenIfNotRemoved -
        Returns:
        an object invalidated from cache.
      • getName

        java.lang.String getName()
        Gets region name. Needed to resolve proper cache region.
      • getHandledTypes

        java.lang.String[] getHandledTypes()
        Gets types which can be stored in the region. Needed to resolve proper cache region.
        Special type names are defined in RegionType.
      • getCacheRegionStatistics

        CacheStatistics getCacheRegionStatistics()
        Gets statistics for current region.
      • getCacheMaxEntries

        long getCacheMaxEntries()
        Gets number of cache entries above which invalidation occurs.
      • clearCache

        void clearCache()
        Removes all elements from cache.
      • registerLifecycleCallback

        void registerLifecycleCallback​(CacheLifecycleCallback callback)
        This callback shall be called when eviction occurs.
      • getMaxReachedSize

        long getMaxReachedSize()
        Returns number of elements currently in the cache
      • getAllKeys

        java.util.Collection<CacheKey> getAllKeys()
        Returns all keys currently stored in this region.
      • remove

        java.lang.Object remove​(CacheKey key,
                                boolean fireEvents)
        Removes value stored on the key specified. This method does not update statistics. Returns value removed or null.
      • containsKey

        boolean containsKey​(CacheKey key)
        Checks if key is in the cache map.
      • setStatsEnabled

        void setStatsEnabled​(boolean enabled)
      • isStatsEnabled

        boolean isStatsEnabled()