@Override
  public void run() throws Exception {
    final int partitionId = getPartitionId();
    final InternalPartitionService partitionService = getNodeEngine().getPartitionService();

    Set<Data> filteredKeys = new HashSet<Data>();
    if (keys != null) {
      for (Data k : keys) {
        if (partitionService.getPartitionId(k) == partitionId) {
          filteredKeys.add(k);
        }
      }
    }

    if (filteredKeys.isEmpty()) {
      return;
    }

    try {
      final ICacheService service = getService();
      cache = service.getOrCreateRecordStore(name, partitionId);
      final Set<Data> keysLoaded = cache.loadAll(filteredKeys, replaceExistingValues);
      shouldBackup = !keysLoaded.isEmpty();
      if (shouldBackup) {
        backupRecords = new HashMap<Data, CacheRecord>(keysLoaded.size());
        for (Data key : keysLoaded) {
          CacheRecord record = cache.getRecord(key);
          // Loaded keys may have been evicted, then record will be null.
          // So if the loaded key is evicted, don't send it to backup.
          if (record != null) {
            backupRecords.put(key, record);
          }
        }
      }
    } catch (CacheException e) {
      response = new CacheClearResponse(e);
    }
  }