com.linecorp.centraldogma.internal.thrift.WatchRepositoryResult.validate()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(128)

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

WatchRepositoryResult.validate介绍

暂无

代码示例

代码示例来源:origin: line/centraldogma

  1. public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  2. struct.validate();
  3. oprot.writeStructBegin(STRUCT_DESC);
  4. if (struct.revision != null) {
  5. if (struct.isSetRevision()) {
  6. oprot.writeFieldBegin(REVISION_FIELD_DESC);
  7. struct.revision.write(oprot);
  8. oprot.writeFieldEnd();
  9. }
  10. }
  11. oprot.writeFieldStop();
  12. oprot.writeStructEnd();
  13. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  2. struct.validate();
  3. oprot.writeStructBegin(STRUCT_DESC);
  4. if (struct.revision != null) {
  5. if (struct.isSetRevision()) {
  6. oprot.writeFieldBegin(REVISION_FIELD_DESC);
  7. struct.revision.write(oprot);
  8. oprot.writeFieldEnd();
  9. }
  10. }
  11. oprot.writeFieldStop();
  12. oprot.writeStructEnd();
  13. }

代码示例来源:origin: line/centraldogma

  1. public void read(org.apache.thrift.protocol.TProtocol iprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  2. org.apache.thrift.protocol.TField schemeField;
  3. iprot.readStructBegin();
  4. while (true)
  5. {
  6. schemeField = iprot.readFieldBegin();
  7. if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
  8. break;
  9. }
  10. switch (schemeField.id) {
  11. case 1: // REVISION
  12. if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
  13. struct.revision = new Revision();
  14. struct.revision.read(iprot);
  15. struct.setRevisionIsSet(true);
  16. } else {
  17. org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  18. }
  19. break;
  20. default:
  21. org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  22. }
  23. iprot.readFieldEnd();
  24. }
  25. iprot.readStructEnd();
  26. // check for required fields of primitive type, which can't be checked in the validate method
  27. struct.validate();
  28. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. public void read(org.apache.thrift.protocol.TProtocol iprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  2. org.apache.thrift.protocol.TField schemeField;
  3. iprot.readStructBegin();
  4. while (true)
  5. {
  6. schemeField = iprot.readFieldBegin();
  7. if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
  8. break;
  9. }
  10. switch (schemeField.id) {
  11. case 1: // REVISION
  12. if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
  13. struct.revision = new Revision();
  14. struct.revision.read(iprot);
  15. struct.setRevisionIsSet(true);
  16. } else {
  17. org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  18. }
  19. break;
  20. default:
  21. org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  22. }
  23. iprot.readFieldEnd();
  24. }
  25. iprot.readStructEnd();
  26. // check for required fields of primitive type, which can't be checked in the validate method
  27. struct.validate();
  28. }

相关文章