code: public boolean update(final V value, final long maxTime, final TimeUnit timeUnit) {
          final K key = keyOf(value);
          if (key != null) {
              return collectionWithWriteTimeout(maxTime, timeUnit)
                      .replaceOne(byId(key), encode(value))
                      .getModifiedCount() == 1;
          } else {
              throw new IllegalArgumentException("Key must not be null");
          }
      }
docs: Updates the document if it is already present in the repository.
  
  @param value    the new value
  @param maxTime  max time for the update
  @param timeUnit the time unit for the maxTime value
  @return true, if the document was updated, false otherwise.