public abstract class GridCacheConcurrentMapImpl extends Object implements GridCacheConcurrentMap
| Constructor and Description |
|---|
GridCacheConcurrentMapImpl(GridCacheContext ctx,
GridCacheMapEntryFactory factory,
int initialCapacity)
Creates a new, empty map with the specified initial
capacity.
|
GridCacheConcurrentMapImpl(GridCacheContext ctx,
GridCacheMapEntryFactory factory,
int initialCapacity,
float loadFactor,
int concurrencyLevel)
Creates a new, empty map with the specified initial
capacity, load factor and concurrency level.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<GridCacheMapEntry> |
allEntries(CacheEntryPredicate... filter) |
Collection<GridCacheMapEntry> |
entries(CacheEntryPredicate... filter) |
Set<GridCacheMapEntry> |
entrySet(CacheEntryPredicate... filter) |
GridCacheMapEntry |
getEntry(KeyCacheObject key)
Returns the entry associated with the specified key in the
HashMap.
|
Set<KeyCacheObject> |
keySet(CacheEntryPredicate... filter) |
GridCacheMapEntry |
putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer,
KeyCacheObject key,
CacheObject val,
boolean create,
boolean touch) |
protected void |
release() |
protected void |
release(int sizeChange,
GridCacheEntryEx e) |
boolean |
removeEntry(GridCacheEntryEx entry)
Removes passed in entry if it presents in the map.
|
protected boolean |
reserve() |
int |
size()
Returns the number of key-value mappings in this map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecrementPublicSize, incrementPublicSize, publicSizepublic GridCacheConcurrentMapImpl(GridCacheContext ctx, GridCacheMapEntryFactory factory, int initialCapacity)
ctx - Cache context.factory - Entry factory.initialCapacity - the initial capacity. The implementation
performs internal sizing to accommodate this many elements.IllegalArgumentException - if the initial capacity is
negative.public GridCacheConcurrentMapImpl(GridCacheContext ctx, GridCacheMapEntryFactory factory, int initialCapacity, float loadFactor, int concurrencyLevel)
ctx - Cache context.factory - Entry factory.initialCapacity - the initial capacity. The implementation
performs internal sizing to accommodate this many elements.loadFactor - the load factor threshold, used to control resizing.
Resizing may be performed when the average number of elements per
bin exceeds this threshold.concurrencyLevel - the estimated number of concurrently
updating threads. The implementation performs internal sizing
to try to accommodate this many threads.IllegalArgumentException - if the initial capacity is
negative or the load factor or concurrencyLevel are
non-positive.@Nullable public GridCacheMapEntry getEntry(KeyCacheObject key)
getEntry in interface GridCacheConcurrentMapkey - Key.@Nullable public GridCacheMapEntry putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer, KeyCacheObject key, @Nullable CacheObject val, boolean create, boolean touch)
putEntryIfObsoleteOrAbsent in interface GridCacheConcurrentMaptopVer - Topology version.key - Key.val - Value.create - Create flag.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.protected boolean reserve()
protected void release()
protected void release(int sizeChange,
GridCacheEntryEx e)
sizeChange - Size delta.e - Map entry.public boolean removeEntry(GridCacheEntryEx entry)
removeEntry in interface GridCacheConcurrentMapentry - Entry to remove.True if remove happened.public int size()
size in interface GridCacheConcurrentMappublic Set<KeyCacheObject> keySet(CacheEntryPredicate... filter)
keySet in interface GridCacheConcurrentMappublic Collection<GridCacheMapEntry> entries(CacheEntryPredicate... filter)
entries in interface GridCacheConcurrentMapfilter - Filter.public Collection<GridCacheMapEntry> allEntries(CacheEntryPredicate... filter)
allEntries in interface GridCacheConcurrentMapfilter - Filter.public Set<GridCacheMapEntry> entrySet(CacheEntryPredicate... filter)
entrySet in interface GridCacheConcurrentMapfilter - Filter.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017