code: protected boolean internalCancel(String appName, String id, boolean isReplication) {
          try {
              read.lock();
              CANCEL.increment(isReplication);
              Map<String, Lease<InstanceInfo>> gMap = registry.get(appName);
              Lease<InstanceInfo> leaseToCancel = null;
              if (gMap != null) {
                  leaseToCancel = gMap.remove(id);
              }
              synchronized (recentCanceledQueue) {
                  recentCanceledQueue.add(new Pair<Long, String>(System.currentTimeMillis(), appName + "(" + id + ")"));
              }
              InstanceStatus instanceStatus = overriddenInstanceStatusMap.remove(id);
              if (instanceStatus != null) {
                  logger.debug("Removed instance id {} from the overridden map which has value {}", id, instanceStatus.name());
              }
              if (leaseToCancel == null) {
                  CANCEL_NOT_FOUND.increment(isReplication);
                  logger.warn("DS: Registry: cancel failed because Lease is not registered for: {}/{}", appName, id);
                  return false;
              } else {
                  leaseToCancel.cancel();
                  InstanceInfo instanceInfo = leaseToCancel.getHolder();
                  String vip = null;
                  String svip = null;
                  if (instanceInfo != null) {
                      instanceInfo.setActionType(ActionType.DELETED);
                      recentlyChangedQueue.add(new RecentlyChangedItem(leaseToCancel));
                      instanceInfo.setLastUpdatedTimestamp();
                      vip = instanceInfo.getVIPAddress();
                      svip = instanceInfo.getSecureVipAddress();
                  }
                  invalidateCache(appName, vip, svip);
                  logger.info("Cancelled instance {}/{} (replication={})", appName, id, isReplication);
                  return true;
              }
          } finally {
              read.unlock();
          }
      }
docs: {@link #cancel(String, String, boolean)} method is overridden by {@link PeerAwareInstanceRegistry}, so each
  cancel request is replicated to the peers. This is however not desired for expires which would be counted
  in the remote peers as valid cancellations, so self preservation mode would not kick-in.