org.tensorflow.util.WorkerShutdownMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto Show documentation
Show all versions of proto Show documentation
Java API for TensorFlow protocol buffers.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/util/event.proto
package org.tensorflow.util;
/**
*
* Indicates the behavior of the worker when an internal error or shutdown
* signal is received.
*
*
* Protobuf enum {@code tensorflow.WorkerShutdownMode}
*/
public enum WorkerShutdownMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* DEFAULT = 0;
*/
DEFAULT(0),
/**
* NOT_CONFIGURED = 1;
*/
NOT_CONFIGURED(1),
/**
* WAIT_FOR_COORDINATOR = 2;
*/
WAIT_FOR_COORDINATOR(2),
/**
* SHUTDOWN_AFTER_TIMEOUT = 3;
*/
SHUTDOWN_AFTER_TIMEOUT(3),
UNRECOGNIZED(-1),
;
/**
* DEFAULT = 0;
*/
public static final int DEFAULT_VALUE = 0;
/**
* NOT_CONFIGURED = 1;
*/
public static final int NOT_CONFIGURED_VALUE = 1;
/**
* WAIT_FOR_COORDINATOR = 2;
*/
public static final int WAIT_FOR_COORDINATOR_VALUE = 2;
/**
* SHUTDOWN_AFTER_TIMEOUT = 3;
*/
public static final int SHUTDOWN_AFTER_TIMEOUT_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WorkerShutdownMode valueOf(int value) {
return forNumber(value);
}
public static WorkerShutdownMode forNumber(int value) {
switch (value) {
case 0: return DEFAULT;
case 1: return NOT_CONFIGURED;
case 2: return WAIT_FOR_COORDINATOR;
case 3: return SHUTDOWN_AFTER_TIMEOUT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
WorkerShutdownMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public WorkerShutdownMode findValueByNumber(int number) {
return WorkerShutdownMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.tensorflow.util.EventProtos.getDescriptor().getEnumTypes().get(1);
}
private static final WorkerShutdownMode[] VALUES = values();
public static WorkerShutdownMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private WorkerShutdownMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:tensorflow.WorkerShutdownMode)
}