本文整理了Java中com.linecorp.centraldogma.internal.thrift.WatchRepositoryResult
类的一些代码示例,展示了WatchRepositoryResult
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WatchRepositoryResult
类的具体详情如下:
包路径:com.linecorp.centraldogma.internal.thrift.WatchRepositoryResult
类名称:WatchRepositoryResult
暂无
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
public WatchRepositoryResult deepCopy() {
return new WatchRepositoryResult(this);
}
代码示例来源:origin: line/centraldogma
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REVISION:
if (value == null) {
unsetRevision();
} else {
setRevision((Revision)value);
}
break;
}
}
代码示例来源:origin: line/centraldogma
public Object getFieldValue(_Fields field) {
switch (field) {
case REVISION:
return getRevision();
}
throw new IllegalStateException();
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server
private static void handleWatchRepositoryResult(
CompletableFuture<com.linecorp.centraldogma.common.Revision> future,
AsyncMethodCallback resultHandler) {
future.handle((res, cause) -> {
if (cause == null) {
final WatchRepositoryResult wrr = new WatchRepositoryResult();
wrr.setRevision(convert(res));
resultHandler.onComplete(wrr);
} else if (cause instanceof CancellationException) {
resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT);
} else {
logAndInvokeOnError("watchRepository", resultHandler, cause);
}
return null;
});
}
代码示例来源:origin: line/centraldogma
public boolean equals(WatchRepositoryResult that) {
if (that == null)
return false;
boolean this_present_revision = true && this.isSetRevision();
boolean that_present_revision = true && that.isSetRevision();
if (this_present_revision || that_present_revision) {
if (!(this_present_revision && that_present_revision))
return false;
if (!this.revision.equals(that.revision))
return false;
}
return true;
}
代码示例来源:origin: line/centraldogma
public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.revision != null) {
if (struct.isSetRevision()) {
oprot.writeFieldBegin(REVISION_FIELD_DESC);
struct.revision.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
代码示例来源:origin: line/centraldogma
public void read(org.apache.thrift.protocol.TProtocol iprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // REVISION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.revision = new Revision();
struct.revision.read(iprot);
struct.setRevisionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
代码示例来源:origin: line/centraldogma
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
代码示例来源:origin: line/centraldogma
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof WatchRepositoryResult)
return this.equals((WatchRepositoryResult)that);
return false;
}
代码示例来源:origin: line/centraldogma
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.revision = new Revision();
struct.revision.read(iprot);
struct.setRevisionIsSet(true);
}
}
}
代码示例来源:origin: line/centraldogma
private static void handleWatchRepositoryResult(
CompletableFuture<com.linecorp.centraldogma.common.Revision> future,
AsyncMethodCallback resultHandler) {
future.handle((res, cause) -> {
if (cause == null) {
final WatchRepositoryResult wrr = new WatchRepositoryResult();
wrr.setRevision(convert(res));
resultHandler.onComplete(wrr);
} else if (cause instanceof CancellationException) {
resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT);
} else {
logAndInvokeOnError("watchRepository", resultHandler, cause);
}
return null;
});
}
代码示例来源:origin: line/centraldogma
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case REVISION:
return isSetRevision();
}
throw new IllegalStateException();
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.revision != null) {
if (struct.isSetRevision()) {
oprot.writeFieldBegin(REVISION_FIELD_DESC);
struct.revision.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
public void read(org.apache.thrift.protocol.TProtocol iprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // REVISION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.revision = new Revision();
struct.revision.read(iprot);
struct.setRevisionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof WatchRepositoryResult)
return this.equals((WatchRepositoryResult)that);
return false;
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.revision = new Revision();
struct.revision.read(iprot);
struct.setRevisionIsSet(true);
}
}
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server-shaded
private static void handleWatchRepositoryResult(
CompletableFuture<com.linecorp.centraldogma.common.Revision> future,
AsyncMethodCallback resultHandler) {
future.handle(voidFunction((res, cause) -> {
if (cause == null) {
final WatchRepositoryResult wrr = new WatchRepositoryResult();
wrr.setRevision(convert(res));
resultHandler.onComplete(wrr);
} else if (cause instanceof CancellationException) {
resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT);
} else {
logAndInvokeOnError("watchRepository", resultHandler, cause);
}
}));
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REVISION:
if (value == null) {
unsetRevision();
} else {
setRevision((Revision)value);
}
break;
}
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded
public Object getFieldValue(_Fields field) {
switch (field) {
case REVISION:
return getRevision();
}
throw new IllegalStateException();
}
内容来源于网络,如有侵权,请联系作者删除!