org.apache.ignite.internal.processors.cache

## Class GridCacheLocalConcurrentMap

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheConcurrentMapImpl
  - - org.apache.ignite.internal.processors.cache.GridCacheLocalConcurrentMap

All Implemented Interfaces:
  GridCacheConcurrentMap

    public class GridCacheLocalConcurrentMap
    extends GridCacheConcurrentMapImpl

GridCacheConcurrentMap implementation for local and near caches.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap

`GridCacheConcurrentMap.CacheMapHolder`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheLocalConcurrentMap(GridCacheContext cctx, GridCacheMapEntryFactory factory, int initCap)`

### Method Summary

Methods
`void` `decrementPublicSize(GridCacheConcurrentMap.CacheMapHolder hld, GridCacheEntryEx e)` Decrements public size.
`protected GridCacheConcurrentMap.CacheMapHolder` `entriesMap(GridCacheContext cctx)`
`protected GridCacheConcurrentMap.CacheMapHolder` `entriesMapIfExists(Integer cacheId)`
`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.

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheConcurrentMapImpl

`entries, entrySet, getEntry, putEntryIfObsoleteOrAbsent, putEntryIfObsoleteOrAbsent, release, release, removeEntry, reserve`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GridCacheLocalConcurrentMap

    public GridCacheLocalConcurrentMap(GridCacheContext cctx,
                               GridCacheMapEntryFactory factory,
                               int initCap)

Parameters:
  `cctx` - Cache context.
  `factory` - Entry factory.
  `initCap` - Initial capacity.

### Method Detail

#### internalSize

    public 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.

#### entriesMap

    @Nullable
    protected GridCacheConcurrentMap.CacheMapHolder entriesMap(GridCacheContext cctx)

Specified by:
  `entriesMap` in class `GridCacheConcurrentMapImpl`
Parameters:
  `cctx` - Cache context.
Returns:
  Map for given cache ID.

#### entriesMapIfExists

    @Nullable
    protected GridCacheConcurrentMap.CacheMapHolder entriesMapIfExists(Integer cacheId)

Specified by:
  `entriesMapIfExists` in class `GridCacheConcurrentMapImpl`
Parameters:
  `cacheId` - Cache ID.
Returns:
  Map for given cache ID.

#### publicSize

    public 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

    public void incrementPublicSize(GridCacheConcurrentMap.CacheMapHolder hld,
                           GridCacheEntryEx e)

Increments public size.

Parameters:
  `hld` - Cache map (passed as optimization to avoid cache map lookup for shared groups).
  `e` - Entry that caused public size change.

#### decrementPublicSize

    public void decrementPublicSize(GridCacheConcurrentMap.CacheMapHolder hld,
                           GridCacheEntryEx e)

Decrements public size.

Parameters:
  `hld` - Cache map (passed as optimization to avoid cache map lookup for shared groups).
  `e` - Entry that caused public size change.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017