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 Description GridCacheLocalConcurrentMap(GridCacheContext cctx, GridCacheMapEntryFactory factory, int initCap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecrementPublicSize(GridCacheConcurrentMap.CacheMapHolder hld, GridCacheEntryEx e)Decrements public size.protected @Nullable GridCacheConcurrentMap.CacheMapHolderentriesMap(GridCacheContext cctx)protected @Nullable GridCacheConcurrentMap.CacheMapHolderentriesMapIfExists(Integer cacheId)voidincrementPublicSize(GridCacheConcurrentMap.CacheMapHolder hld, GridCacheEntryEx e)Increments public size.intinternalSize()Returns the number of key-value mappings in this map.intpublicSize(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
-
-
-
-
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 @Nullable GridCacheConcurrentMap.CacheMapHolder entriesMap(GridCacheContext cctx)
- Specified by:
entriesMapin classGridCacheConcurrentMapImpl- Parameters:
cctx- Cache context.- Returns:
- Map for given cache ID.
-
entriesMapIfExists
@Nullable protected @Nullable GridCacheConcurrentMap.CacheMapHolder entriesMapIfExists(Integer cacheId)
- Specified by:
entriesMapIfExistsin classGridCacheConcurrentMapImpl- 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.
-
-