code: public void cancel(long orderId, long size) {
      Order order = orders.get(orderId);
      if (order == null) {
        return;
      }
  
      long remainingQuantity = order.size();
  
      if (size >= remainingQuantity) {
        return;
      }
  
      if (size > 0) {
        order.resize(size);
      } else {
        delete(order);
        orders.remove(orderId);
      }
  
      cancelListener.onNext(new CancelOrder(orderId, remainingQuantity - size, size));
    }
docs: Cancel a quantity of an order in this order book. The size refers to the new order size. If the
  new order size is set to zero, the order is deleted from this order book.
  
  <p>A Cancel event is triggered.
  
  <p>If the order identifier is unknown, do nothing.
  
  @param orderId the order identifier
  @param size the new size