Interface GridCacheConcurrentMap

    • Method Detail

      • getEntry

        @Nullable
        @Nullable GridCacheMapEntry getEntry​(GridCacheContext ctx,
                                             KeyCacheObject key)
        Returns the entry associated with the specified key in the HashMap. Returns null if the HashMap contains no mapping for this key.
        Parameters:
        ctx - Cache context.
        key - Key.
        Returns:
        Entry.
      • putEntryIfObsoleteOrAbsent

        GridCacheMapEntry putEntryIfObsoleteOrAbsent​(GridCacheContext ctx,
                                                     AffinityTopologyVersion topVer,
                                                     KeyCacheObject key,
                                                     boolean create,
                                                     boolean skipReserve)
        Parameters:
        ctx - Cache context.
        topVer - Topology version.
        key - Key.
        create - Create flag.
        skipReserve - Skip partition reservation flag.
        Returns:
        Existing or new GridCacheMapEntry. Will return null if entry is obsolete or absent and create flag is set to false. Will also return null if create flag is set to true, but entry couldn't be created.
      • removeEntry

        boolean removeEntry​(GridCacheEntryEx entry)
        Removes passed in entry if it presents in the map.
        Parameters:
        entry - Entry to remove.
        Returns:
        True if remove happened.
      • internalSize

        int internalSize()
        Returns the number of key-value mappings in this map. It does not include entries from underlying data store.
        Returns:
        the number of key-value mappings in this map.
      • publicSize

        int publicSize​(int cacheId)
        Returns the number of publicly available key-value mappings in this map. It excludes entries that are marked as deleted. It also does not include entries from underlying data store.
        Parameters:
        cacheId - Cache ID.
        Returns:
        the number of publicly available key-value mappings in this map.
      • incrementPublicSize

        void incrementPublicSize​(@Nullable
                                 @Nullable GridCacheConcurrentMap.CacheMapHolder hld,
                                 GridCacheEntryEx e)
        Increments public size.
        Parameters:
        e - Entry that caused public size change.
        hld - Cache map (passed as optimization to avoid cache map lookup for shared groups).
      • decrementPublicSize

        void decrementPublicSize​(@Nullable
                                 @Nullable GridCacheConcurrentMap.CacheMapHolder hld,
                                 GridCacheEntryEx e)
        Decrements public size.
        Parameters:
        e - Entry that caused public size change.
        hld - Cache map (passed as optimization to avoid cache map lookup for shared groups).
      • entries

        Iterable<GridCacheMapEntry> entries​(int cacheId,
                                            CacheEntryPredicate... filter)
        Parameters:
        cacheId - Cache ID.
        filter - Filter.
        Returns:
        Iterable of the mappings contained in this map, excluding entries in unvisitable state.