sendEntry(ice, segmentId);
}
}
// send cache store entries if needed
CacheStore cacheStore = getCacheStore();
if (cacheStore != null) {
try {
//todo [anistor] need to extend CacheStore interface to be able to specify a filter when loading keys (ie. keys should belong to desired segments)
Set<Object> storedKeys = cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer));
for (Object key : storedKeys) {
int segmentId = readCh.getSegment(key);
if (segments.contains(segmentId)) {
try {
InternalCacheEntry ice = cacheStore.load(key);
if (ice != null) { // check entry still exists
sendEntry(ice, segmentId);
}
} catch (CacheLoaderException e) {
log.failedLoadingValueFromCacheStore(key, e);