
org.tensorflow.util.WorkerShutdownMode Maven / Gradle / Ivy
The newest version!
// 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),
/**
* SHUTDOWN_IMMEDIATELY = 1;
*/
SHUTDOWN_IMMEDIATELY(1),
/**
* WAIT_FOR_COORDINATOR = 2;
*/
WAIT_FOR_COORDINATOR(2),
UNRECOGNIZED(-1),
;
/**
* DEFAULT = 0;
*/
public static final int DEFAULT_VALUE = 0;
/**
* SHUTDOWN_IMMEDIATELY = 1;
*/
public static final int SHUTDOWN_IMMEDIATELY_VALUE = 1;
/**
* WAIT_FOR_COORDINATOR = 2;
*/
public static final int WAIT_FOR_COORDINATOR_VALUE = 2;
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 SHUTDOWN_IMMEDIATELY;
case 2: return WAIT_FOR_COORDINATOR;
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)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy