K
- keyV
- valuepublic class ClusterWideIterator<K,V> extends AbstractClusterWideIterator<K,V> implements Iterator<javax.cache.Cache.Entry<K,V>>
ICache
This cluster key iterator, uses to indexes to iterate the cluster which ar PartitionId and tableIndex.
Starting from the largest PartitionId it accesses related partition with a tableIndex. Each partition has
a concurrentMap with single segment. So each partition data is basically a concurrent hashMap to iterate on.
With a configurable batch size of keys are fetch from partition data, i.e CacheRecordStore.
Although keys fetch in batches the AbstractClusterWideIterator.next()
returns the entry one by one due to uncertainty of data.cache, currentIndex, fetchSize, index, lastTableIndex, partitionCount, partitionIndex, result
Constructor and Description |
---|
ClusterWideIterator(CacheProxy<K,V> cache) |
Modifier and Type | Method and Description |
---|---|
protected CacheKeyIteratorResult |
fetch() |
protected Data |
toData(Object obj) |
protected <T> T |
toObject(Object data) |
advance, ensureOpen, getPartitionCount, hasNext, next, remove
public ClusterWideIterator(CacheProxy<K,V> cache)
protected CacheKeyIteratorResult fetch()
fetch
in class AbstractClusterWideIterator<K,V>
protected Data toData(Object obj)
toData
in class AbstractClusterWideIterator<K,V>
protected <T> T toObject(Object data)
toObject
in class AbstractClusterWideIterator<K,V>
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.