code: protected boolean hasVectorClock(boolean isVectorClockOptional) {
          boolean result = false;
  
          String vectorClockHeader = this.request.getHeader(RestMessageHeaders.X_VOLD_VECTOR_CLOCK);
          if(vectorClockHeader != null) {
              ObjectMapper mapper = new ObjectMapper();
              try {
                  VectorClockWrapper vcWrapper = mapper.readValue(vectorClockHeader,
                                                                  VectorClockWrapper.class);
                  this.parsedVectorClock = new VectorClock(vcWrapper.getVersions(),
                                                           vcWrapper.getTimestamp());
                  result = true;
              } catch(Exception e) {
                  logger.error("Exception while parsing and constructing vector clock", e);
                  RestErrorHandler.writeErrorResponse(this.messageEvent,
                                                      HttpResponseStatus.BAD_REQUEST,
                                                      "Invalid Vector Clock");
              }
          } else if(!isVectorClockOptional) {
              logger.error("Error when validating request. Missing Vector Clock");
              RestErrorHandler.writeErrorResponse(this.messageEvent,
                                                  HttpResponseStatus.BAD_REQUEST,
                                                  "Missing Vector Clock");
          } else {
              result = true;
          }
  
          return result;
      }
docs: Retrieve and validate vector clock value from the REST request.
  "X_VOLD_VECTOR_CLOCK" is the vector clock header.
  
  @return true if present, false if missing