@Override
  public Object perform(InvocationContext ctx) throws Throwable {
    // It's not worth looking up the entry if we're never going to apply the change.
    if (valueMatcher == ValueMatcher.MATCH_NEVER) {
      successful = false;
      return null;
    }
    MVCCEntry e = (MVCCEntry) ctx.lookupEntry(key);
    if (e == null || e.isNull() || e.isRemoved()) {
      nonExistent = true;
      if (valueMatcher.matches(e, value, null, valueEquivalence)) {
        if (e != null) {
          e.setChanged(true);
          e.setRemoved(true);
        }
        return isConditional() ? true : null;
      } else {
        log.trace("Nothing to remove since the entry doesn't exist in the context or it is null");
        successful = false;
        return false;
      }
    }

    if (!valueMatcher.matches(e, value, null, valueEquivalence)) {
      successful = false;
      return false;
    }

    if (this instanceof EvictCommand) {
      e.setEvicted(true);
    }

    return performRemove(e, ctx);
  }