com.linecorp.centraldogma.internal.thrift.WatchRepositoryResult类的使用及代码示例

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

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

WatchRepositoryResult介绍

暂无

代码示例

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

  1. public WatchRepositoryResult deepCopy() {
  2. return new WatchRepositoryResult(this);
  3. }

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

  1. public void setFieldValue(_Fields field, Object value) {
  2. switch (field) {
  3. case REVISION:
  4. if (value == null) {
  5. unsetRevision();
  6. } else {
  7. setRevision((Revision)value);
  8. }
  9. break;
  10. }
  11. }

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

  1. public Object getFieldValue(_Fields field) {
  2. switch (field) {
  3. case REVISION:
  4. return getRevision();
  5. }
  6. throw new IllegalStateException();
  7. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server

  1. private static void handleWatchRepositoryResult(
  2. CompletableFuture<com.linecorp.centraldogma.common.Revision> future,
  3. AsyncMethodCallback resultHandler) {
  4. future.handle((res, cause) -> {
  5. if (cause == null) {
  6. final WatchRepositoryResult wrr = new WatchRepositoryResult();
  7. wrr.setRevision(convert(res));
  8. resultHandler.onComplete(wrr);
  9. } else if (cause instanceof CancellationException) {
  10. resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT);
  11. } else {
  12. logAndInvokeOnError("watchRepository", resultHandler, cause);
  13. }
  14. return null;
  15. });
  16. }

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

  1. public boolean equals(WatchRepositoryResult that) {
  2. if (that == null)
  3. return false;
  4. boolean this_present_revision = true && this.isSetRevision();
  5. boolean that_present_revision = true && that.isSetRevision();
  6. if (this_present_revision || that_present_revision) {
  7. if (!(this_present_revision && that_present_revision))
  8. return false;
  9. if (!this.revision.equals(that.revision))
  10. return false;
  11. }
  12. return true;
  13. }

代码示例来源: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: 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: line/centraldogma

  1. private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  2. try {
  3. read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  4. } catch (org.apache.thrift.TException te) {
  5. throw new java.io.IOException(te);
  6. }
  7. }

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

  1. @Override
  2. public boolean equals(Object that) {
  3. if (that == null)
  4. return false;
  5. if (that instanceof WatchRepositoryResult)
  6. return this.equals((WatchRepositoryResult)that);
  7. return false;
  8. }

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

  1. @Override
  2. public void read(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  3. TTupleProtocol iprot = (TTupleProtocol) prot;
  4. BitSet incoming = iprot.readBitSet(1);
  5. if (incoming.get(0)) {
  6. struct.revision = new Revision();
  7. struct.revision.read(iprot);
  8. struct.setRevisionIsSet(true);
  9. }
  10. }
  11. }

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

  1. private static void handleWatchRepositoryResult(
  2. CompletableFuture<com.linecorp.centraldogma.common.Revision> future,
  3. AsyncMethodCallback resultHandler) {
  4. future.handle((res, cause) -> {
  5. if (cause == null) {
  6. final WatchRepositoryResult wrr = new WatchRepositoryResult();
  7. wrr.setRevision(convert(res));
  8. resultHandler.onComplete(wrr);
  9. } else if (cause instanceof CancellationException) {
  10. resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT);
  11. } else {
  12. logAndInvokeOnError("watchRepository", resultHandler, cause);
  13. }
  14. return null;
  15. });
  16. }

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

  1. /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  2. public boolean isSet(_Fields field) {
  3. if (field == null) {
  4. throw new IllegalArgumentException();
  5. }
  6. switch (field) {
  7. case REVISION:
  8. return isSetRevision();
  9. }
  10. throw new IllegalStateException();
  11. }

代码示例来源: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: 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. }

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

  1. private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  2. try {
  3. read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  4. } catch (org.apache.thrift.TException te) {
  5. throw new java.io.IOException(te);
  6. }
  7. }

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

  1. @Override
  2. public boolean equals(Object that) {
  3. if (that == null)
  4. return false;
  5. if (that instanceof WatchRepositoryResult)
  6. return this.equals((WatchRepositoryResult)that);
  7. return false;
  8. }

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

  1. @Override
  2. public void read(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  3. TTupleProtocol iprot = (TTupleProtocol) prot;
  4. BitSet incoming = iprot.readBitSet(1);
  5. if (incoming.get(0)) {
  6. struct.revision = new Revision();
  7. struct.revision.read(iprot);
  8. struct.setRevisionIsSet(true);
  9. }
  10. }
  11. }

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

  1. private static void handleWatchRepositoryResult(
  2. CompletableFuture<com.linecorp.centraldogma.common.Revision> future,
  3. AsyncMethodCallback resultHandler) {
  4. future.handle(voidFunction((res, cause) -> {
  5. if (cause == null) {
  6. final WatchRepositoryResult wrr = new WatchRepositoryResult();
  7. wrr.setRevision(convert(res));
  8. resultHandler.onComplete(wrr);
  9. } else if (cause instanceof CancellationException) {
  10. resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT);
  11. } else {
  12. logAndInvokeOnError("watchRepository", resultHandler, cause);
  13. }
  14. }));
  15. }

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

  1. public void setFieldValue(_Fields field, Object value) {
  2. switch (field) {
  3. case REVISION:
  4. if (value == null) {
  5. unsetRevision();
  6. } else {
  7. setRevision((Revision)value);
  8. }
  9. break;
  10. }
  11. }

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

  1. public Object getFieldValue(_Fields field) {
  2. switch (field) {
  3. case REVISION:
  4. return getRevision();
  5. }
  6. throw new IllegalStateException();
  7. }

相关文章