docs: private MapEntryUpdateResult<K, byte[]> replaceIf(
        long index, K key, MapEntryValue newValue, Predicate<MapEntryValue> predicate) {
      MapEntryValue oldValue = entries().get(key);
  
      // If the key is not set or the current value doesn't match the predicate, return a PRECONDITION_FAILED error.
      if (valueIsNull(oldValue) || !predicate.test(oldValue)) {
        return new MapEntryUpdateResult<>(
            MapEntryUpdateResult.Status.PRECONDITION_FAILED,
            index,
            key,
            toVersioned(oldValue));
      }
  
      // If the key has been locked by a transaction, return a WRITE_LOCK error.
      if (preparedKeys.contains(key)) {
        return new MapEntryUpdateResult<>(MapEntryUpdateResult.Status.WRITE_LOCK, index, key, null);
      }
  
      putValue(key, newValue);
      Versioned<byte[]> result = toVersioned(oldValue);
      publish(new AtomicMapEvent<>(AtomicMapEvent.Type.UPDATE, key, toVersioned(newValue), result));
      return new MapEntryUpdateResult<>(MapEntryUpdateResult.Status.OK, index, key, result);
    }