io.grpc.Status.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中io.grpc.Status.<init>()方法的一些代码示例,展示了Status.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Status.<init>()方法的具体详情如下:
包路径:io.grpc.Status
类名称:Status
方法名:<init>

Status.<init>介绍

暂无

代码示例

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Create a derived instance of {@link Status} augmenting the current description with
 * additional detail.  Leading and trailing whitespace may be removed; this may change in the
 * future.
 */
public Status augmentDescription(String additionalDetail) {
 if (additionalDetail == null) {
  return this;
 } else if (this.description == null) {
  return new Status(this.code, additionalDetail, this.cause);
 } else {
  return new Status(this.code, this.description + "\n" + additionalDetail, this.cause);
 }
}

代码示例来源:origin: io.grpc/grpc-core

/**
 * Create a derived instance of {@link Status} augmenting the current description with
 * additional detail.  Leading and trailing whitespace may be removed; this may change in the
 * future.
 */
public Status augmentDescription(String additionalDetail) {
 if (additionalDetail == null) {
  return this;
 } else if (this.description == null) {
  return new Status(this.code, additionalDetail, this.cause);
 } else {
  return new Status(this.code, this.description + "\n" + additionalDetail, this.cause);
 }
}

代码示例来源:origin: io.grpc/grpc-core

/**
 * Create a derived instance of {@link Status} with the given cause.
 * However, the cause is not transmitted from server to client.
 */
public Status withCause(Throwable cause) {
 if (Objects.equal(this.cause, cause)) {
  return this;
 }
 return new Status(this.code, this.description, cause);
}

代码示例来源:origin: io.grpc/grpc-core

/**
 * Create a derived instance of {@link Status} with the given description.  Leading and trailing
 * whitespace may be removed; this may change in the future.
 */
public Status withDescription(String description) {
 if (Objects.equal(this.description, description)) {
  return this;
 }
 return new Status(this.code, description, this.cause);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Create a derived instance of {@link Status} with the given cause.
 * However, the cause is not transmitted from server to client.
 */
public Status withCause(Throwable cause) {
 if (Objects.equal(this.cause, cause)) {
  return this;
 }
 return new Status(this.code, this.description, cause);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Create a derived instance of {@link Status} with the given description.  Leading and trailing
 * whitespace may be removed; this may change in the future.
 */
public Status withDescription(String description) {
 if (Objects.equal(this.description, description)) {
  return this;
 }
 return new Status(this.code, description, this.cause);
}

代码示例来源:origin: io.grpc/grpc-core

private static List<Status> buildStatusList() {
 TreeMap<Integer, Status> canonicalizer = new TreeMap<Integer, Status>();
 for (Code code : Code.values()) {
  Status replaced = canonicalizer.put(code.value(), new Status(code));
  if (replaced != null) {
   throw new IllegalStateException("Code value duplication between "
     + replaced.getCode().name() + " & " + code.name());
  }
 }
 return Collections.unmodifiableList(new ArrayList<>(canonicalizer.values()));
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

private static List<Status> buildStatusList() {
 TreeMap<Integer, Status> canonicalizer = new TreeMap<Integer, Status>();
 for (Code code : Code.values()) {
  Status replaced = canonicalizer.put(code.value(), new Status(code));
  if (replaced != null) {
   throw new IllegalStateException("Code value duplication between "
     + replaced.getCode().name() + " & " + code.name());
  }
 }
 return Collections.unmodifiableList(new ArrayList<Status>(canonicalizer.values()));
}

相关文章