org.apache.ignite.internal.processors.cache

## Interface GridCacheConcurrentMap

All Known Implementing Classes:
  GridCacheConcurrentMapImpl, GridCacheLocalConcurrentMap, GridCachePartitionedConcurrentMap, GridDhtLocalPartition, GridNoStorageCacheMap

    public interface GridCacheConcurrentMap

Concurrent cache map.

### Nested Class Summary

Nested Classes
`static class` `GridCacheConcurrentMap.CacheMapHolder`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `decrementPublicSize(GridCacheConcurrentMap.CacheMapHolder hld, GridCacheEntryEx e)` Decrements public size.
`Iterable<GridCacheMapEntry>` `entries(int cacheId, CacheEntryPredicate... filter)`
`Set<GridCacheMapEntry>` `entrySet(int cacheId, CacheEntryPredicate... filter)`
`GridCacheMapEntry` `getEntry(GridCacheContext ctx, KeyCacheObject key)` Returns the entry associated with the specified key in the HashMap.
`void` `incrementPublicSize(GridCacheConcurrentMap.CacheMapHolder hld, GridCacheEntryEx e)` Increments public size.
`int` `internalSize()` Returns the number of key-value mappings in this map.
`int` `publicSize(int cacheId)` Returns the number of publicly available key-value mappings in this map.
`GridCacheMapEntry` `putEntryIfObsoleteOrAbsent(GridCacheContext ctx, AffinityTopologyVersion topVer, KeyCacheObject key, boolean create, boolean touch)`
`boolean` `removeEntry(GridCacheEntryEx entry)` Removes passed in entry if it presents in the map.

### Method Detail

#### getEntry

    @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

    @Nullable
    GridCacheMapEntry putEntryIfObsoleteOrAbsent(GridCacheContext ctx,
                                                           AffinityTopologyVersion topVer,
                                                           KeyCacheObject key,
                                                           boolean create,
                                                           boolean touch)

Parameters:
  `ctx` - Cache context.
  `topVer` - Topology version.
  `key` - Key.
  `create` - Create 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
                             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
                             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.

#### entrySet

    Set<GridCacheMapEntry> entrySet(int cacheId,
                                    CacheEntryPredicate... filter)

Parameters:
  `cacheId` - Cache ID.
  `filter` - Filter.
Returns:
  Set of the mappings contained in this map.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018