org.apache.ignite.internal.processors.cache

## Interface GridCacheConcurrentMap

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

    public interface GridCacheConcurrentMap

Concurrent cache map.

### Method Summary

Methods
`Iterable<GridCacheMapEntry>` `allEntries(CacheEntryPredicate... filter)`
`void` `decrementPublicSize(GridCacheEntryEx e)` Decrements public size.
`Iterable<GridCacheMapEntry>` `entries(CacheEntryPredicate... filter)`
`Set<GridCacheMapEntry>` `entrySet(CacheEntryPredicate... filter)`
`GridCacheMapEntry` `getEntry(KeyCacheObject key)` Returns the entry associated with the specified key in the HashMap.
`void` `incrementPublicSize(GridCacheEntryEx e)` Increments public size.
`Set<KeyCacheObject>` `keySet(CacheEntryPredicate... filter)`
`int` `publicSize()` Returns the number of publicly available key-value mappings in this map.
`GridCacheMapEntry` `putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer, KeyCacheObject key, CacheObject val, boolean create, boolean touch)`
`GridCacheMapEntry` `randomEntry()`
`boolean` `removeEntry(GridCacheEntryEx entry)` Removes passed in entry if it presents in the map.
`int` `size()` Returns the number of key-value mappings in this map.

### Method Detail

#### getEntry

    @Nullable
    GridCacheMapEntry getEntry(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:
  `key` - Key.
Returns:
  Entry.

#### putEntryIfObsoleteOrAbsent

    @Nullable
    GridCacheMapEntry putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer,
                                                        KeyCacheObject key,
                                                        @Nullable
                                                        CacheObject val,
                                                        boolean create,
                                                        boolean touch)

Parameters:
  `topVer` - Topology version.
  `key` - Key.
  `val` - Value.
  `create` - Create flag.
Returns:
  Triple where the first element is current entry associated with the key, the second is created entry and the third is doomed (all may be null).

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

#### size

    int size()

Returns the number of key-value mappings in this map.

Returns:
  the number of key-value mappings in this map.

#### publicSize

    int publicSize()

Returns the number of publicly available key-value mappings in this map. It excludes entries that are marked as deleted.

Returns:
  the number of publicly available key-value mappings in this map.

#### incrementPublicSize

    void incrementPublicSize(GridCacheEntryEx e)

Increments public size.

Parameters:
  `e` - Entry that caused public size change.

#### decrementPublicSize

    void decrementPublicSize(GridCacheEntryEx e)

Decrements public size.

Parameters:
  `e` - Entry that caused public size change.

#### randomEntry

    @Nullable
    GridCacheMapEntry randomEntry()

#### keySet

    Set<KeyCacheObject> keySet(CacheEntryPredicate... filter)

Returns:
  Random entry out of hash map.

#### entries

    Iterable<GridCacheMapEntry> entries(CacheEntryPredicate... filter)

Parameters:
  `filter` - Filter.
Returns:
  Iterable of the mappings contained in this map, excluding entries in unvisitable state.

#### allEntries

    Iterable<GridCacheMapEntry> allEntries(CacheEntryPredicate... filter)

Parameters:
  `filter` - Filter.
Returns:
  Iterable of the mappings contained in this map, including entries in unvisitable state.

#### entrySet

    Set<GridCacheMapEntry> entrySet(CacheEntryPredicate... filter)

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

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016