Gets a random entry out of cache. In the worst cache scenario this method
has complexity of
O(S * N/64)
where
N is the size of internal hash
table and
S is the number of hash table buckets to sample, which is
5by default. However, if the table is pretty dense, with density factor of
N/64,
which is true for near fully populated caches, this method will generally perform significantly
faster with complexity of O(S) where
S = 5.
Note that this method is not available on
GridCacheProjection API since it is
impossible (or very hard) to deterministically return a number value when pre-filtering
and post-filtering is involved (e.g. projection level predicate filters).