protected MapScanResult<Object, Object> scanIterator(String name, RedisClient client, long startPos, String pattern, int count) { MapScanResult<Object, Object> res = ((RedissonMap<?, ?>)map).scanIterator(name, client, startPos, pattern, count); Map<HashValue, MapEntry> newstate = new HashMap<HashValue, MapEntry>(state); for (Iterator<Object> iterator = res.getMap().keySet().iterator(); iterator.hasNext();) { Object entry = iterator.next(); MapEntry mapEntry = newstate.remove(toKeyHash(entry)); if (mapEntry != null) { if (mapEntry == MapEntry.NULL) { iterator.remove(); continue; } res.getMap().put(entry, mapEntry.getValue()); } } if (startPos == 0) { for (Entry<HashValue, MapEntry> entry : newstate.entrySet()) { if (entry.getValue() == MapEntry.NULL) { continue; } res.getMap().put(entry.getValue().getKey(), entry.getValue().getValue()); } } return res; }
protected MapScanResult<Object, Object> scanIterator(String name, RedisClient client, long startPos, String pattern, int count) { MapScanResult<Object, Object> res = ((RedissonMap<?, ?>)map).scanIterator(name, client, startPos, pattern, count); Map<HashValue, MapEntry> newstate = new HashMap<HashValue, MapEntry>(state); for (Iterator<Object> iterator = res.getMap().keySet().iterator(); iterator.hasNext();) { Object entry = iterator.next(); MapEntry mapEntry = newstate.remove(toKeyHash(entry)); if (mapEntry != null) { if (mapEntry == MapEntry.NULL) { iterator.remove(); continue; } res.getMap().put(entry, mapEntry.getValue()); } } if (startPos == 0) { for (Entry<HashValue, MapEntry> entry : newstate.entrySet()) { if (entry.getValue() == MapEntry.NULL) { continue; } res.getMap().put(entry.getValue().getKey(), entry.getValue().getValue()); } } return res; }
MapScanResult<Object, Object> res = map.scanIterator(client, keysIterPos); client = res.getRedisClient(); keysIter = res.getMap().entrySet().iterator(); keysIterPos = res.getPos();
MapScanResult<Object, Object> res = map.scanIterator(client, keysIterPos); client = res.getRedisClient(); keysIter = res.getMap().entrySet().iterator(); keysIterPos = res.getPos();
} else if (o instanceof MapScanResult) { MapScanResult scanResult = (MapScanResult) o; Map oldMap = ((MapScanResult) o).getMap(); Map map = (Map) tryHandleReference(oldMap); if (map != oldMap) {
} else if (o instanceof MapScanResult) { MapScanResult scanResult = (MapScanResult) o; Map oldMap = ((MapScanResult) o).getMap(); Map map = (Map) tryHandleReference(oldMap); if (map != oldMap) {
protected MapScanResult<Object, Object> scanIterator(String name, RedisClient client, long startPos, String pattern, int count) { MapScanResult<Object, Object> res = ((RedissonMap<?, ?>)map).scanIterator(name, client, startPos, pattern, count); Map<HashValue, MapEntry> newstate = new HashMap<HashValue, MapEntry>(state); for (Iterator<Object> iterator = res.getMap().keySet().iterator(); iterator.hasNext();) { Object entry = iterator.next(); MapEntry mapEntry = newstate.remove(toKeyHash(entry)); if (mapEntry != null) { if (mapEntry == MapEntry.NULL) { iterator.remove(); continue; } res.getMap().put(entry, mapEntry.getValue()); } } if (startPos == 0) { for (Entry<HashValue, MapEntry> entry : newstate.entrySet()) { if (entry.getValue() == MapEntry.NULL) { continue; } res.getMap().put(entry.getValue().getKey(), entry.getValue().getValue()); } } return res; }
MapScanResult<Object, Object> res = map.scanIterator(client, keysIterPos); client = res.getRedisClient(); keysIter = res.getMap().entrySet().iterator(); keysIterPos = res.getPos();
} else if (o instanceof MapScanResult) { MapScanResult scanResult = (MapScanResult) o; Map oldMap = ((MapScanResult) o).getMap(); Map map = (Map) tryHandleReference(oldMap); if (map != oldMap) {