// gather all keys from cache store that belong to the segments that are being removed/moved to L1
CacheStore cacheStore = getCacheStore();
if (cacheStore != null) {
//todo [anistor] extend CacheStore interface to be able to specify a filter when loading keys (ie. keys should belong to desired segments)
try {
Set<Object> storedKeys = cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer));
for (Object key : storedKeys) {
int keySegment = getSegment(key);
if (segmentsToL1.contains(keySegment)) {
keysToL1.add(key);
} else if (!newSegments.contains(keySegment)) {