org.apache.gobblin.util.guid.Guid.combine()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(140)

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

Guid.combine介绍

[英]Combine multiple Guids into a single Guid.
[中]将多个Guid组合成一个Guid。

代码示例

代码示例来源:origin: apache/incubator-gobblin

/**
 * Creates a new {@link Guid} which is a unique, replicable representation of the pair (this, guids). Equivalent to
 * combine(this, guid1, guid2, ...)
 * @param guids an array of {@link Guid}.
 * @return a new {@link Guid}.
 * @throws IOException
 */
public Guid append(Guid... guids) throws IOException {
 if (guids == null || guids.length == 0) {
  return this;
 }
 return combine(ArrayUtils.add(guids, this));
}

代码示例来源:origin: apache/incubator-gobblin

private static String computeGuid(State state, CopyEntity file) throws IOException {
  Optional<Guid> stateGuid = CopySource.getWorkUnitGuid(state);
  if (stateGuid.isPresent()) {
   return Guid.combine(file.guid(), stateGuid.get()).toString();
  }
  throw new IOException("State does not contain a guid.");
 }
}

代码示例来源:origin: org.apache.gobblin/gobblin-utility

/**
 * Creates a new {@link Guid} which is a unique, replicable representation of the pair (this, guids). Equivalent to
 * combine(this, guid1, guid2, ...)
 * @param guids an array of {@link Guid}.
 * @return a new {@link Guid}.
 * @throws IOException
 */
public Guid append(Guid... guids) throws IOException {
 if (guids == null || guids.length == 0) {
  return this;
 }
 return combine(ArrayUtils.add(guids, this));
}

代码示例来源:origin: org.apache.gobblin/gobblin-data-management

private static String computeGuid(State state, CopyEntity file) throws IOException {
  Optional<Guid> stateGuid = CopySource.getWorkUnitGuid(state);
  if (stateGuid.isPresent()) {
   return Guid.combine(file.guid(), stateGuid.get()).toString();
  }
  throw new IOException("State does not contain a guid.");
 }
}

相关文章