default CheckAndMutateResult preCheckAndMutate(
    ObserverContext<? extends RegionCoprocessorEnvironment> c, CheckAndMutate checkAndMutate,
    CheckAndMutateResult result) throws IOException {
    if (checkAndMutate.getAction() instanceof Put) {
      boolean success;
      if (checkAndMutate.hasFilter()) {
        success = preCheckAndPut(c, checkAndMutate.getRow(), checkAndMutate.getFilter(),
          (Put) checkAndMutate.getAction(), result.isSuccess());
      } else {
        success = preCheckAndPut(c, checkAndMutate.getRow(), checkAndMutate.getFamily(),
          checkAndMutate.getQualifier(), checkAndMutate.getCompareOp(),
          new BinaryComparator(checkAndMutate.getValue()), (Put) checkAndMutate.getAction(),
          result.isSuccess());
      }
      return new CheckAndMutateResult(success, null);
    } else if (checkAndMutate.getAction() instanceof Delete) {
      boolean success;
      if (checkAndMutate.hasFilter()) {
        success = preCheckAndDelete(c, checkAndMutate.getRow(), checkAndMutate.getFilter(),
          (Delete) checkAndMutate.getAction(), result.isSuccess());
      } else {
        success = preCheckAndDelete(c, checkAndMutate.getRow(), checkAndMutate.getFamily(),
          checkAndMutate.getQualifier(), checkAndMutate.getCompareOp(),
          new BinaryComparator(checkAndMutate.getValue()), (Delete) checkAndMutate.getAction(),
          result.isSuccess());
      }
      return new CheckAndMutateResult(success, null);
    }
    return result;
  }
Called before checkAndMutate
<p>
Call CoprocessorEnvironment#bypass to skip default actions. If 'bypass' is set, we skip out on
calling any subsequent chained coprocessors.
<p>
Note: Do not retain references to any Cells in actions beyond the life of this invocation. If
need a Cell reference for later use, copy the cell and use that.
@param c              the environment provided by the region server
@param checkAndMutate the CheckAndMutate object
@param result         the default value of the result
@return the return value to return to client if bypassing default processing
@throws IOException if an error occurred on the coprocessor
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java