Package com.google.cloud.batch.v1alpha
Class Runnable
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.batch.v1alpha.Runnable
-
- All Implemented Interfaces:
RunnableOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class Runnable extends com.google.protobuf.GeneratedMessageV3 implements RunnableOrBuilder
Runnable describes instructions for executing a specific script or container as part of a Task.
Protobuf typegoogle.cloud.batch.v1alpha.Runnable- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRunnable.BarrierBarrier runnable blocks until all tasks in a taskgroup reach it.static interfaceRunnable.BarrierOrBuilderstatic classRunnable.BuilderRunnable describes instructions for executing a specific script or container as part of a Task.static classRunnable.ContainerContainer runnable.static interfaceRunnable.ContainerOrBuilderstatic classRunnable.ExecutableCasestatic classRunnable.ScriptScript runnable.static interfaceRunnable.ScriptOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intALWAYS_RUN_FIELD_NUMBERstatic intBACKGROUND_FIELD_NUMBERstatic intBARRIER_FIELD_NUMBERstatic intCONTAINER_FIELD_NUMBERstatic intDISPLAY_NAME_FIELD_NUMBERstatic intENVIRONMENT_FIELD_NUMBERstatic intIGNORE_EXIT_STATUS_FIELD_NUMBERstatic intLABELS_FIELD_NUMBERstatic intSCRIPT_FIELD_NUMBERstatic intTIMEOUT_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsLabels(String key)Labels for this Runnable.booleanequals(Object obj)booleangetAlwaysRun()By default, after a Runnable fails, no further Runnable are executed.booleangetBackground()This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables.Runnable.BarriergetBarrier()Barrier runnable.Runnable.BarrierOrBuildergetBarrierOrBuilder()Barrier runnable.Runnable.ContainergetContainer()Container runnable.Runnable.ContainerOrBuildergetContainerOrBuilder()Container runnable.static RunnablegetDefaultInstance()RunnablegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetDisplayName()Optional.com.google.protobuf.ByteStringgetDisplayNameBytes()Optional.EnvironmentgetEnvironment()Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).EnvironmentOrBuildergetEnvironmentOrBuilder()Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).Runnable.ExecutableCasegetExecutableCase()booleangetIgnoreExitStatus()Normally, a non-zero exit status causes the Task to fail.Map<String,String>getLabels()Deprecated.intgetLabelsCount()Labels for this Runnable.Map<String,String>getLabelsMap()Labels for this Runnable.StringgetLabelsOrDefault(String key, String defaultValue)Labels for this Runnable.StringgetLabelsOrThrow(String key)Labels for this Runnable.com.google.protobuf.Parser<Runnable>getParserForType()Runnable.ScriptgetScript()Script runnable.Runnable.ScriptOrBuildergetScriptOrBuilder()Script runnable.intgetSerializedSize()com.google.protobuf.DurationgetTimeout()Timeout for this Runnable.com.google.protobuf.DurationOrBuildergetTimeoutOrBuilder()Timeout for this Runnable.booleanhasBarrier()Barrier runnable.booleanhasContainer()Container runnable.booleanhasEnvironment()Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).inthashCode()booleanhasScript()Script runnable.booleanhasTimeout()Timeout for this Runnable.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static Runnable.BuildernewBuilder()static Runnable.BuildernewBuilder(Runnable prototype)Runnable.BuildernewBuilderForType()protected Runnable.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static RunnableparseDelimitedFrom(InputStream input)static RunnableparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RunnableparseFrom(byte[] data)static RunnableparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RunnableparseFrom(com.google.protobuf.ByteString data)static RunnableparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RunnableparseFrom(com.google.protobuf.CodedInputStream input)static RunnableparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RunnableparseFrom(InputStream input)static RunnableparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RunnableparseFrom(ByteBuffer data)static RunnableparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Runnable>parser()Runnable.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CONTAINER_FIELD_NUMBER
public static final int CONTAINER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCRIPT_FIELD_NUMBER
public static final int SCRIPT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BARRIER_FIELD_NUMBER
public static final int BARRIER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IGNORE_EXIT_STATUS_FIELD_NUMBER
public static final int IGNORE_EXIT_STATUS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BACKGROUND_FIELD_NUMBER
public static final int BACKGROUND_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALWAYS_RUN_FIELD_NUMBER
public static final int ALWAYS_RUN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENVIRONMENT_FIELD_NUMBER
public static final int ENVIRONMENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TIMEOUT_FIELD_NUMBER
public static final int TIMEOUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getExecutableCase
public Runnable.ExecutableCase getExecutableCase()
- Specified by:
getExecutableCasein interfaceRunnableOrBuilder
-
hasContainer
public boolean hasContainer()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;- Specified by:
hasContainerin interfaceRunnableOrBuilder- Returns:
- Whether the container field is set.
-
getContainer
public Runnable.Container getContainer()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;- Specified by:
getContainerin interfaceRunnableOrBuilder- Returns:
- The container.
-
getContainerOrBuilder
public Runnable.ContainerOrBuilder getContainerOrBuilder()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;- Specified by:
getContainerOrBuilderin interfaceRunnableOrBuilder
-
hasScript
public boolean hasScript()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;- Specified by:
hasScriptin interfaceRunnableOrBuilder- Returns:
- Whether the script field is set.
-
getScript
public Runnable.Script getScript()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;- Specified by:
getScriptin interfaceRunnableOrBuilder- Returns:
- The script.
-
getScriptOrBuilder
public Runnable.ScriptOrBuilder getScriptOrBuilder()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;- Specified by:
getScriptOrBuilderin interfaceRunnableOrBuilder
-
hasBarrier
public boolean hasBarrier()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;- Specified by:
hasBarrierin interfaceRunnableOrBuilder- Returns:
- Whether the barrier field is set.
-
getBarrier
public Runnable.Barrier getBarrier()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;- Specified by:
getBarrierin interfaceRunnableOrBuilder- Returns:
- The barrier.
-
getBarrierOrBuilder
public Runnable.BarrierOrBuilder getBarrierOrBuilder()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;- Specified by:
getBarrierOrBuilderin interfaceRunnableOrBuilder
-
getDisplayName
public String getDisplayName()
Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
string display_name = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDisplayNamein interfaceRunnableOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()
Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
string display_name = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDisplayNameBytesin interfaceRunnableOrBuilder- Returns:
- The bytes for displayName.
-
getIgnoreExitStatus
public boolean getIgnoreExitStatus()
Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.
bool ignore_exit_status = 3;- Specified by:
getIgnoreExitStatusin interfaceRunnableOrBuilder- Returns:
- The ignoreExitStatus.
-
getBackground
public boolean getBackground()
This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).
bool background = 4;- Specified by:
getBackgroundin interfaceRunnableOrBuilder- Returns:
- The background.
-
getAlwaysRun
public boolean getAlwaysRun()
By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.
bool always_run = 5;- Specified by:
getAlwaysRunin interfaceRunnableOrBuilder- Returns:
- The alwaysRun.
-
hasEnvironment
public boolean hasEnvironment()
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;- Specified by:
hasEnvironmentin interfaceRunnableOrBuilder- Returns:
- Whether the environment field is set.
-
getEnvironment
public Environment getEnvironment()
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;- Specified by:
getEnvironmentin interfaceRunnableOrBuilder- Returns:
- The environment.
-
getEnvironmentOrBuilder
public EnvironmentOrBuilder getEnvironmentOrBuilder()
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;- Specified by:
getEnvironmentOrBuilderin interfaceRunnableOrBuilder
-
hasTimeout
public boolean hasTimeout()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;- Specified by:
hasTimeoutin interfaceRunnableOrBuilder- Returns:
- Whether the timeout field is set.
-
getTimeout
public com.google.protobuf.Duration getTimeout()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;- Specified by:
getTimeoutin interfaceRunnableOrBuilder- Returns:
- The timeout.
-
getTimeoutOrBuilder
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;- Specified by:
getTimeoutOrBuilderin interfaceRunnableOrBuilder
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:RunnableOrBuilderLabels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsCountin interfaceRunnableOrBuilder
-
containsLabels
public boolean containsLabels(String key)
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
containsLabelsin interfaceRunnableOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceRunnableOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsMapin interfaceRunnableOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsOrDefaultin interfaceRunnableOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsOrThrowin interfaceRunnableOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Runnable parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Runnable parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Runnable parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Runnable parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Runnable parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Runnable parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Runnable.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Runnable.Builder newBuilder()
-
newBuilder
public static Runnable.Builder newBuilder(Runnable prototype)
-
toBuilder
public Runnable.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Runnable.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Runnable getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Runnable> parser()
-
getParserForType
public com.google.protobuf.Parser<Runnable> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Runnable getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-