docs: @Override
    public void replace(List list, String resourceVersion) {
      lock.writeLock().lock();
      try {
        Set<String> keys = new HashSet<>();
        for (Object obj : list) {
          String key = this.keyOf(obj);
          keys.add(key);
          this.queueActionLocked(DeltaType.Sync, obj);
        }
  
        if (this.knownObjects == null) {
          for (Map.Entry<String, Deque<MutablePair<DeltaType, Object>>> entry :
              this.items.entrySet()) {
            if (keys.contains(entry.getKey())) {
              continue;
            }
  
            Object deletedObj = null;
            MutablePair<DeltaType, Object> delta = entry.getValue().peekLast(); // get newest
            if (delta != null) {
              deletedObj = delta.getRight();
            }
            this.queueActionLocked(
                DeltaType.Deleted, new DeletedFinalStateUnknown(entry.getKey(), deletedObj));
          }
  
          if (!this.populated) {
            this.populated = true;
            this.initialPopulationCount = list.size();
          }
          return;
        }
  
        // Detect deletions not already in the queue.
        List<String> knownKeys = this.knownObjects.listKeys();
        int queueDeletion = 0;
        for (String knownKey : knownKeys) {
          if (keys.contains(knownKey)) {
            continue;
          }
  
          Object deletedObj = this.knownObjects.getByKey(knownKey);
          if (deletedObj == null) {
            log.warn(
                "Key {} does not exist in known objects store, placing DeleteFinalStateUnknown marker without object",
                knownKey);
          }
          queueDeletion++;
          this.queueActionLocked(
              DeltaType.Deleted, new DeletedFinalStateUnknown<>(knownKey, deletedObj));
        }
  
        if (!this.populated) {
          this.populated = true;
          this.initialPopulationCount = list.size() + queueDeletion;
        }
      } finally {
        lock.writeLock().unlock();
      }
    }