com.google.apphosting.executor.Retry Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: retry.proto
package com.google.apphosting.executor;
public final class Retry {
private Retry() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface RetryParametersOrBuilder extends
// @@protoc_insertion_point(interface_extends:java.apphosting.RetryParameters)
com.google.protobuf.MessageOrBuilder {
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @return Whether the retryLimit field is set.
*/
boolean hasRetryLimit();
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @return The retryLimit.
*/
int getRetryLimit();
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @return Whether the ageLimitSec field is set.
*/
boolean hasAgeLimitSec();
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @return The ageLimitSec.
*/
long getAgeLimitSec();
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @return Whether the minBackoffSec field is set.
*/
boolean hasMinBackoffSec();
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @return The minBackoffSec.
*/
double getMinBackoffSec();
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @return Whether the maxBackoffSec field is set.
*/
boolean hasMaxBackoffSec();
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @return The maxBackoffSec.
*/
double getMaxBackoffSec();
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @return Whether the maxDoublings field is set.
*/
boolean hasMaxDoublings();
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @return The maxDoublings.
*/
int getMaxDoublings();
}
/**
* Protobuf type {@code java.apphosting.RetryParameters}
*/
public static final class RetryParameters extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:java.apphosting.RetryParameters)
RetryParametersOrBuilder {
private static final long serialVersionUID = 0L;
// Use RetryParameters.newBuilder() to construct.
private RetryParameters(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RetryParameters() {
minBackoffSec_ = 0.1D;
maxBackoffSec_ = 3600D;
maxDoublings_ = 16;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RetryParameters();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.apphosting.executor.Retry.internal_static_java_apphosting_RetryParameters_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.apphosting.executor.Retry.internal_static_java_apphosting_RetryParameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.apphosting.executor.Retry.RetryParameters.class, com.google.apphosting.executor.Retry.RetryParameters.Builder.class);
}
private int bitField0_;
public static final int RETRY_LIMIT_FIELD_NUMBER = 1;
private int retryLimit_ = 0;
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @return Whether the retryLimit field is set.
*/
@java.lang.Override
public boolean hasRetryLimit() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @return The retryLimit.
*/
@java.lang.Override
public int getRetryLimit() {
return retryLimit_;
}
public static final int AGE_LIMIT_SEC_FIELD_NUMBER = 2;
private long ageLimitSec_ = 0L;
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @return Whether the ageLimitSec field is set.
*/
@java.lang.Override
public boolean hasAgeLimitSec() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @return The ageLimitSec.
*/
@java.lang.Override
public long getAgeLimitSec() {
return ageLimitSec_;
}
public static final int MIN_BACKOFF_SEC_FIELD_NUMBER = 3;
private double minBackoffSec_ = 0.1D;
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @return Whether the minBackoffSec field is set.
*/
@java.lang.Override
public boolean hasMinBackoffSec() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @return The minBackoffSec.
*/
@java.lang.Override
public double getMinBackoffSec() {
return minBackoffSec_;
}
public static final int MAX_BACKOFF_SEC_FIELD_NUMBER = 4;
private double maxBackoffSec_ = 3600D;
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @return Whether the maxBackoffSec field is set.
*/
@java.lang.Override
public boolean hasMaxBackoffSec() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @return The maxBackoffSec.
*/
@java.lang.Override
public double getMaxBackoffSec() {
return maxBackoffSec_;
}
public static final int MAX_DOUBLINGS_FIELD_NUMBER = 5;
private int maxDoublings_ = 16;
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @return Whether the maxDoublings field is set.
*/
@java.lang.Override
public boolean hasMaxDoublings() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @return The maxDoublings.
*/
@java.lang.Override
public int getMaxDoublings() {
return maxDoublings_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt32(1, retryLimit_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt64(2, ageLimitSec_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeDouble(3, minBackoffSec_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeDouble(4, maxBackoffSec_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeInt32(5, maxDoublings_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, retryLimit_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, ageLimitSec_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, minBackoffSec_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, maxBackoffSec_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, maxDoublings_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.apphosting.executor.Retry.RetryParameters)) {
return super.equals(obj);
}
com.google.apphosting.executor.Retry.RetryParameters other = (com.google.apphosting.executor.Retry.RetryParameters) obj;
if (hasRetryLimit() != other.hasRetryLimit()) return false;
if (hasRetryLimit()) {
if (getRetryLimit()
!= other.getRetryLimit()) return false;
}
if (hasAgeLimitSec() != other.hasAgeLimitSec()) return false;
if (hasAgeLimitSec()) {
if (getAgeLimitSec()
!= other.getAgeLimitSec()) return false;
}
if (hasMinBackoffSec() != other.hasMinBackoffSec()) return false;
if (hasMinBackoffSec()) {
if (java.lang.Double.doubleToLongBits(getMinBackoffSec())
!= java.lang.Double.doubleToLongBits(
other.getMinBackoffSec())) return false;
}
if (hasMaxBackoffSec() != other.hasMaxBackoffSec()) return false;
if (hasMaxBackoffSec()) {
if (java.lang.Double.doubleToLongBits(getMaxBackoffSec())
!= java.lang.Double.doubleToLongBits(
other.getMaxBackoffSec())) return false;
}
if (hasMaxDoublings() != other.hasMaxDoublings()) return false;
if (hasMaxDoublings()) {
if (getMaxDoublings()
!= other.getMaxDoublings()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasRetryLimit()) {
hash = (37 * hash) + RETRY_LIMIT_FIELD_NUMBER;
hash = (53 * hash) + getRetryLimit();
}
if (hasAgeLimitSec()) {
hash = (37 * hash) + AGE_LIMIT_SEC_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAgeLimitSec());
}
if (hasMinBackoffSec()) {
hash = (37 * hash) + MIN_BACKOFF_SEC_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMinBackoffSec()));
}
if (hasMaxBackoffSec()) {
hash = (37 * hash) + MAX_BACKOFF_SEC_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMaxBackoffSec()));
}
if (hasMaxDoublings()) {
hash = (37 * hash) + MAX_DOUBLINGS_FIELD_NUMBER;
hash = (53 * hash) + getMaxDoublings();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.apphosting.executor.Retry.RetryParameters parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.apphosting.executor.Retry.RetryParameters prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code java.apphosting.RetryParameters}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:java.apphosting.RetryParameters)
com.google.apphosting.executor.Retry.RetryParametersOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.apphosting.executor.Retry.internal_static_java_apphosting_RetryParameters_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.apphosting.executor.Retry.internal_static_java_apphosting_RetryParameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.apphosting.executor.Retry.RetryParameters.class, com.google.apphosting.executor.Retry.RetryParameters.Builder.class);
}
// Construct using com.google.apphosting.executor.Retry.RetryParameters.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
retryLimit_ = 0;
ageLimitSec_ = 0L;
minBackoffSec_ = 0.1D;
maxBackoffSec_ = 3600D;
maxDoublings_ = 16;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.apphosting.executor.Retry.internal_static_java_apphosting_RetryParameters_descriptor;
}
@java.lang.Override
public com.google.apphosting.executor.Retry.RetryParameters getDefaultInstanceForType() {
return com.google.apphosting.executor.Retry.RetryParameters.getDefaultInstance();
}
@java.lang.Override
public com.google.apphosting.executor.Retry.RetryParameters build() {
com.google.apphosting.executor.Retry.RetryParameters result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.apphosting.executor.Retry.RetryParameters buildPartial() {
com.google.apphosting.executor.Retry.RetryParameters result = new com.google.apphosting.executor.Retry.RetryParameters(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.apphosting.executor.Retry.RetryParameters result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.retryLimit_ = retryLimit_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.ageLimitSec_ = ageLimitSec_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.minBackoffSec_ = minBackoffSec_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.maxBackoffSec_ = maxBackoffSec_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.maxDoublings_ = maxDoublings_;
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.apphosting.executor.Retry.RetryParameters) {
return mergeFrom((com.google.apphosting.executor.Retry.RetryParameters)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.apphosting.executor.Retry.RetryParameters other) {
if (other == com.google.apphosting.executor.Retry.RetryParameters.getDefaultInstance()) return this;
if (other.hasRetryLimit()) {
setRetryLimit(other.getRetryLimit());
}
if (other.hasAgeLimitSec()) {
setAgeLimitSec(other.getAgeLimitSec());
}
if (other.hasMinBackoffSec()) {
setMinBackoffSec(other.getMinBackoffSec());
}
if (other.hasMaxBackoffSec()) {
setMaxBackoffSec(other.getMaxBackoffSec());
}
if (other.hasMaxDoublings()) {
setMaxDoublings(other.getMaxDoublings());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
retryLimit_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
ageLimitSec_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 25: {
minBackoffSec_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
case 33: {
maxBackoffSec_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 40: {
maxDoublings_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int retryLimit_ ;
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @return Whether the retryLimit field is set.
*/
@java.lang.Override
public boolean hasRetryLimit() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @return The retryLimit.
*/
@java.lang.Override
public int getRetryLimit() {
return retryLimit_;
}
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @param value The retryLimit to set.
* @return This builder for chaining.
*/
public Builder setRetryLimit(int value) {
retryLimit_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The maxiumum number of times this operation can be retried before failing
* permanently. For example, if 0 is specified and the task fails, the task is
* not retried at all. If 1 is specified and the task fails, the task is
* retried once. If this parameter is unspecified, the task is retried
* indefinitely.
* Note: if both retry_limit and age_limit_sec are present, then we fail
* permanently only when both limits have been reached.
*
*
* optional int32 retry_limit = 1;
* @return This builder for chaining.
*/
public Builder clearRetryLimit() {
bitField0_ = (bitField0_ & ~0x00000001);
retryLimit_ = 0;
onChanged();
return this;
}
private long ageLimitSec_ ;
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @return Whether the ageLimitSec field is set.
*/
@java.lang.Override
public boolean hasAgeLimitSec() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @return The ageLimitSec.
*/
@java.lang.Override
public long getAgeLimitSec() {
return ageLimitSec_;
}
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @param value The ageLimitSec to set.
* @return This builder for chaining.
*/
public Builder setAgeLimitSec(long value) {
ageLimitSec_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The maximum time since the first try of this operation that can pass before
* failing permanently. Note: if both retry_limit and age_limit_sec are
* present, then we fail permanently only when both limits have been reached.
*
*
* optional int64 age_limit_sec = 2;
* @return This builder for chaining.
*/
public Builder clearAgeLimitSec() {
bitField0_ = (bitField0_ & ~0x00000002);
ageLimitSec_ = 0L;
onChanged();
return this;
}
private double minBackoffSec_ = 0.1D;
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @return Whether the minBackoffSec field is set.
*/
@java.lang.Override
public boolean hasMinBackoffSec() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @return The minBackoffSec.
*/
@java.lang.Override
public double getMinBackoffSec() {
return minBackoffSec_;
}
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @param value The minBackoffSec to set.
* @return This builder for chaining.
*/
public Builder setMinBackoffSec(double value) {
minBackoffSec_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The minimum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double min_backoff_sec = 3 [default = 0.1];
* @return This builder for chaining.
*/
public Builder clearMinBackoffSec() {
bitField0_ = (bitField0_ & ~0x00000004);
minBackoffSec_ = 0.1D;
onChanged();
return this;
}
private double maxBackoffSec_ = 3600D;
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @return Whether the maxBackoffSec field is set.
*/
@java.lang.Override
public boolean hasMaxBackoffSec() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @return The maxBackoffSec.
*/
@java.lang.Override
public double getMaxBackoffSec() {
return maxBackoffSec_;
}
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @param value The maxBackoffSec to set.
* @return This builder for chaining.
*/
public Builder setMaxBackoffSec(double value) {
maxBackoffSec_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The maximum time interval after a failure of an operation at which we can
* schedule a retry of that operation.
*
*
* optional double max_backoff_sec = 4 [default = 3600];
* @return This builder for chaining.
*/
public Builder clearMaxBackoffSec() {
bitField0_ = (bitField0_ & ~0x00000008);
maxBackoffSec_ = 3600D;
onChanged();
return this;
}
private int maxDoublings_ = 16;
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @return Whether the maxDoublings field is set.
*/
@java.lang.Override
public boolean hasMaxDoublings() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @return The maxDoublings.
*/
@java.lang.Override
public int getMaxDoublings() {
return maxDoublings_;
}
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @param value The maxDoublings to set.
* @return This builder for chaining.
*/
public Builder setMaxDoublings(int value) {
maxDoublings_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The maximum number of times the current retry interval will be
* doubled before the interval increases linearly.
* A task's retry interval starts at min_backoff_sec, then doubles
* max_doublings times, then increases linearly, and finally retries
* are made at intervals of max_backoff_sec until the retry_limit is
* reached. Thus after max_doublings intervals, the retry interval
* will be 2^(max_doublings - 1) * min_backoff_sec, and then the
* retry interval will be linearly increased by 2^max_doublings *
* min_backoff_sec, until max_backoff_sec is reached.
* For example, if min_backoff_sec is 10s, max_backoff_sec is 300s,
* and max_doublings is 3, then the a task will first be retried in
* 10s. The retry interval will double three times, and then
* increase linearly by 2^3 * 10s, and then stay constant at
* 300s. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
* 240s, 300s, 300s, ....
*
*
* optional int32 max_doublings = 5 [default = 16];
* @return This builder for chaining.
*/
public Builder clearMaxDoublings() {
bitField0_ = (bitField0_ & ~0x00000010);
maxDoublings_ = 16;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:java.apphosting.RetryParameters)
}
// @@protoc_insertion_point(class_scope:java.apphosting.RetryParameters)
private static final com.google.apphosting.executor.Retry.RetryParameters DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.apphosting.executor.Retry.RetryParameters();
}
public static com.google.apphosting.executor.Retry.RetryParameters getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RetryParameters parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.apphosting.executor.Retry.RetryParameters getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_java_apphosting_RetryParameters_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_java_apphosting_RetryParameters_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\013retry.proto\022\017java.apphosting\"\225\001\n\017Retry" +
"Parameters\022\023\n\013retry_limit\030\001 \001(\005\022\025\n\rage_l" +
"imit_sec\030\002 \001(\003\022\034\n\017min_backoff_sec\030\003 \001(\001:" +
"\0030.1\022\035\n\017max_backoff_sec\030\004 \001(\001:\0043600\022\031\n\rm" +
"ax_doublings\030\005 \001(\005:\00216B \n\036com.google.app" +
"hosting.executor"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_java_apphosting_RetryParameters_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_java_apphosting_RetryParameters_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_java_apphosting_RetryParameters_descriptor,
new java.lang.String[] { "RetryLimit", "AgeLimitSec", "MinBackoffSec", "MaxBackoffSec", "MaxDoublings", });
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy