Examples of errorCode()


Examples of kafka.javaapi.OffsetResponse.errorCode()

    OffsetResponse response = consumer.getOffsetsBefore(request);

    // Retrieve offsets from response
    long[] offsets = response.hasError() ? null : response.offsets(topicPart.getTopic(), topicPart.getPartition());
    if (offsets == null || offsets.length <= 0) {
      short errorCode = response.errorCode(topicPart.getTopic(), topicPart.getPartition());

      // If the topic partition doesn't exists, use offset 0 without logging error.
      if (errorCode != ErrorMapping.UnknownTopicOrPartitionCode()) {
        consumers.refresh(brokerInfo);
        LOG.warn("Failed to fetch offset for {} with timestamp {}. Error: {}. Default offset to 0.",
View Full Code Here

Examples of kafka.javaapi.PartitionMetadata.errorCode()

    return offsets[0];
  }

  public boolean isLeaderPresent() {
    PartitionMetadata metadata = fetchPartitonMetadata();
    return !(metadata == null || metadata.errorCode() != ErrorMapping.NoError());
  }

  private void closeConsumer() {
    if (consumer != null) {
      consumer.close();
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket.errorCode()

      writeInt(optionsToJdwpOptions(options),
          "options", MethodImpl.getInvokeOptions(), outData); //$NON-NLS-1$

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.CT_INVOKE_METHOD, outBytes);
      switch (replyPacket.errorCode()) {
      case JdwpReplyPacket.INVALID_METHODID:
        throw new IllegalArgumentException();
      case JdwpReplyPacket.TYPE_MISMATCH:
        throw new InvalidTypeException();
      case JdwpReplyPacket.INVALID_CLASS:
View Full Code Here

Examples of org.elasticsearch.river.twitter.test.helper.HttpClientResponse.errorCode()

    private void launchTest(XContentBuilder river, final Integer numDocs, boolean removeRiver)
            throws IOException, InterruptedException {
        logger.info("  -> Checking internet working");
        new HttpClient("www.elasticsearch.org", 80).request("/");
        HttpClientResponse response = new HttpClient("www.elasticsearch.org", 80).request("/");
        Assert.assertThat(response.errorCode(), is(200));

        logger.info("  -> Create river");
        try {
            createIndex(getDbName());
        } catch (IndexAlreadyExistsException e) {
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Email.errorCode()

    @Override
    public String convertToValang(String fieldName, Annotation a, MessageSourceAccessor messages) {
        Email annotation = (Email) a;

        String errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
        String applyIfValang = valangToJS(annotation.applyIf());

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return this.equals((this.EmailFunction(this.getPropertyValue(");
        sb.append(wrapAndEscapeJsString(fieldName)); // name
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Expression.errorCode()

    @Override
    public String convertToValang(String fieldName, Annotation a, MessageSourceAccessor messages) {
        Expression annotation = (Expression) a;

        String errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
        String applyIfValang = valangToJS(annotation.applyIf());
        String expression = valangToJS(annotation.value());

        return buildBasicRule(fieldName, errMsg, expression, applyIfValang, annotation);
    }
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.InTheFuture.errorCode()

            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "lessThan";
            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof InTheFuture) {
            InTheFuture annotation = (InTheFuture) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "moreThan";
            applyIfValang = valangToJS(annotation.applyIf());
        }

        StringBuffer sb = new StringBuffer();
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.InThePast.errorCode()

        String pastFutureMethod = "";
        String applyIfValang = null;

        if (a instanceof InThePast) {
            InThePast annotation = (InThePast) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "lessThan";
            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof InTheFuture) {
            InTheFuture annotation = (InTheFuture) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.InThePast.errorCode()

            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "lessThan";
            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof InTheFuture) {
            InTheFuture annotation = (InTheFuture) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "moreThan";
            applyIfValang = valangToJS(annotation.applyIf());
        }

        StringBuffer sb = new StringBuffer();
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Length.errorCode()

        int max = 0;
        String applyIfValang = null;

        if (a instanceof Length) {
            Length annotation = (Length) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            min = annotation.min();
            max = annotation.max();
            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof Size) {
            Size annotation = (Size) a;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.