Class Protocol.ErrorMessage.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Protocol.ErrorMessage.Builder>
com.google.protobuf.GeneratedMessage.Builder<Protocol.ErrorMessage.Builder>
dev.restate.sdk.core.generated.protocol.Protocol.ErrorMessage.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Protocol.ErrorMessageOrBuilder
,Cloneable
- Enclosing class:
Protocol.ErrorMessage
public static final class Protocol.ErrorMessage.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Protocol.ErrorMessage.Builder>
implements Protocol.ErrorMessageOrBuilder
Type: 0x0000 + 2Protobuf type
dev.restate.service.protocol.ErrorMessage
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
clear()
The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.Contains a concise error message, e.g.Delay before executing the next retry, specified as duration in milliseconds.Command that caused the failure.Name of the entry that caused the failure.Command type.The exception stacktrace, if available.int
getCode()
The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
Contains a concise error message, e.g.com.google.protobuf.ByteString
Contains a concise error message, e.g.long
Delay before executing the next retry, specified as duration in milliseconds.int
Command that caused the failure.Name of the entry that caused the failure.com.google.protobuf.ByteString
Name of the entry that caused the failure.int
Command type.The exception stacktrace, if available.com.google.protobuf.ByteString
The exception stacktrace, if available.boolean
Delay before executing the next retry, specified as duration in milliseconds.boolean
Command that caused the failure.boolean
Name of the entry that caused the failure.boolean
Command type.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(Protocol.ErrorMessage other) setCode
(int value) The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.setMessage
(String value) Contains a concise error message, e.g.setMessageBytes
(com.google.protobuf.ByteString value) Contains a concise error message, e.g.setNextRetryDelay
(long value) Delay before executing the next retry, specified as duration in milliseconds.setRelatedCommandIndex
(int value) Command that caused the failure.setRelatedCommandName
(String value) Name of the entry that caused the failure.setRelatedCommandNameBytes
(com.google.protobuf.ByteString value) Name of the entry that caused the failure.setRelatedCommandType
(int value) Command type.setStacktrace
(String value) The exception stacktrace, if available.setStacktraceBytes
(com.google.protobuf.ByteString value) The exception stacktrace, if available.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<Protocol.ErrorMessage.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<Protocol.ErrorMessage.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<Protocol.ErrorMessage.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Protocol.ErrorMessage.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<Protocol.ErrorMessage.Builder>
-
mergeFrom
public Protocol.ErrorMessage.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Protocol.ErrorMessage.Builder>
- Throws:
IOException
-
getCode
public int getCode()The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml. In addition, we define the following error codes that MAY be used by the SDK for better error reporting: * JOURNAL_MISMATCH = 570, that is when the SDK cannot replay a journal due to the mismatch between the journal and the actual code. * PROTOCOL_VIOLATION = 571, that is when the SDK receives an unexpected message or an expected message variant, given its state.
uint32 code = 1;
- Specified by:
getCode
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The code.
-
setCode
The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml. In addition, we define the following error codes that MAY be used by the SDK for better error reporting: * JOURNAL_MISMATCH = 570, that is when the SDK cannot replay a journal due to the mismatch between the journal and the actual code. * PROTOCOL_VIOLATION = 571, that is when the SDK receives an unexpected message or an expected message variant, given its state.
uint32 code = 1;
- Parameters:
value
- The code to set.- Returns:
- This builder for chaining.
-
clearCode
The code can be any HTTP status code, as described https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml. In addition, we define the following error codes that MAY be used by the SDK for better error reporting: * JOURNAL_MISMATCH = 570, that is when the SDK cannot replay a journal due to the mismatch between the journal and the actual code. * PROTOCOL_VIOLATION = 571, that is when the SDK receives an unexpected message or an expected message variant, given its state.
uint32 code = 1;
- Returns:
- This builder for chaining.
-
getMessage
Contains a concise error message, e.g. Throwable#getMessage() in Java.
string message = 2;
- Specified by:
getMessage
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The message.
-
getMessageBytes
public com.google.protobuf.ByteString getMessageBytes()Contains a concise error message, e.g. Throwable#getMessage() in Java.
string message = 2;
- Specified by:
getMessageBytes
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The bytes for message.
-
setMessage
Contains a concise error message, e.g. Throwable#getMessage() in Java.
string message = 2;
- Parameters:
value
- The message to set.- Returns:
- This builder for chaining.
-
clearMessage
Contains a concise error message, e.g. Throwable#getMessage() in Java.
string message = 2;
- Returns:
- This builder for chaining.
-
setMessageBytes
Contains a concise error message, e.g. Throwable#getMessage() in Java.
string message = 2;
- Parameters:
value
- The bytes for message to set.- Returns:
- This builder for chaining.
-
getStacktrace
The exception stacktrace, if available.
string stacktrace = 3;
- Specified by:
getStacktrace
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The stacktrace.
-
getStacktraceBytes
public com.google.protobuf.ByteString getStacktraceBytes()The exception stacktrace, if available.
string stacktrace = 3;
- Specified by:
getStacktraceBytes
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The bytes for stacktrace.
-
setStacktrace
The exception stacktrace, if available.
string stacktrace = 3;
- Parameters:
value
- The stacktrace to set.- Returns:
- This builder for chaining.
-
clearStacktrace
The exception stacktrace, if available.
string stacktrace = 3;
- Returns:
- This builder for chaining.
-
setStacktraceBytes
The exception stacktrace, if available.
string stacktrace = 3;
- Parameters:
value
- The bytes for stacktrace to set.- Returns:
- This builder for chaining.
-
hasRelatedCommandIndex
public boolean hasRelatedCommandIndex()Command that caused the failure. This may be outside the current stored journal size. If no specific entry caused the failure, the current replayed/processed entry can be used.
optional uint32 related_command_index = 4;
- Specified by:
hasRelatedCommandIndex
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- Whether the relatedCommandIndex field is set.
-
getRelatedCommandIndex
public int getRelatedCommandIndex()Command that caused the failure. This may be outside the current stored journal size. If no specific entry caused the failure, the current replayed/processed entry can be used.
optional uint32 related_command_index = 4;
- Specified by:
getRelatedCommandIndex
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The relatedCommandIndex.
-
setRelatedCommandIndex
Command that caused the failure. This may be outside the current stored journal size. If no specific entry caused the failure, the current replayed/processed entry can be used.
optional uint32 related_command_index = 4;
- Parameters:
value
- The relatedCommandIndex to set.- Returns:
- This builder for chaining.
-
clearRelatedCommandIndex
Command that caused the failure. This may be outside the current stored journal size. If no specific entry caused the failure, the current replayed/processed entry can be used.
optional uint32 related_command_index = 4;
- Returns:
- This builder for chaining.
-
hasRelatedCommandName
public boolean hasRelatedCommandName()Name of the entry that caused the failure.
optional string related_command_name = 5;
- Specified by:
hasRelatedCommandName
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- Whether the relatedCommandName field is set.
-
getRelatedCommandName
Name of the entry that caused the failure.
optional string related_command_name = 5;
- Specified by:
getRelatedCommandName
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The relatedCommandName.
-
getRelatedCommandNameBytes
public com.google.protobuf.ByteString getRelatedCommandNameBytes()Name of the entry that caused the failure.
optional string related_command_name = 5;
- Specified by:
getRelatedCommandNameBytes
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The bytes for relatedCommandName.
-
setRelatedCommandName
Name of the entry that caused the failure.
optional string related_command_name = 5;
- Parameters:
value
- The relatedCommandName to set.- Returns:
- This builder for chaining.
-
clearRelatedCommandName
Name of the entry that caused the failure.
optional string related_command_name = 5;
- Returns:
- This builder for chaining.
-
setRelatedCommandNameBytes
public Protocol.ErrorMessage.Builder setRelatedCommandNameBytes(com.google.protobuf.ByteString value) Name of the entry that caused the failure.
optional string related_command_name = 5;
- Parameters:
value
- The bytes for relatedCommandName to set.- Returns:
- This builder for chaining.
-
hasRelatedCommandType
public boolean hasRelatedCommandType()Command type.
optional uint32 related_command_type = 6;
- Specified by:
hasRelatedCommandType
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- Whether the relatedCommandType field is set.
-
getRelatedCommandType
public int getRelatedCommandType()Command type.
optional uint32 related_command_type = 6;
- Specified by:
getRelatedCommandType
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The relatedCommandType.
-
setRelatedCommandType
Command type.
optional uint32 related_command_type = 6;
- Parameters:
value
- The relatedCommandType to set.- Returns:
- This builder for chaining.
-
clearRelatedCommandType
Command type.
optional uint32 related_command_type = 6;
- Returns:
- This builder for chaining.
-
hasNextRetryDelay
public boolean hasNextRetryDelay()Delay before executing the next retry, specified as duration in milliseconds. If provided, it will override the default retry policy used by Restate's invoker ONLY for the next retry attempt.
optional uint64 next_retry_delay = 8;
- Specified by:
hasNextRetryDelay
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- Whether the nextRetryDelay field is set.
-
getNextRetryDelay
public long getNextRetryDelay()Delay before executing the next retry, specified as duration in milliseconds. If provided, it will override the default retry policy used by Restate's invoker ONLY for the next retry attempt.
optional uint64 next_retry_delay = 8;
- Specified by:
getNextRetryDelay
in interfaceProtocol.ErrorMessageOrBuilder
- Returns:
- The nextRetryDelay.
-
setNextRetryDelay
Delay before executing the next retry, specified as duration in milliseconds. If provided, it will override the default retry policy used by Restate's invoker ONLY for the next retry attempt.
optional uint64 next_retry_delay = 8;
- Parameters:
value
- The nextRetryDelay to set.- Returns:
- This builder for chaining.
-
clearNextRetryDelay
Delay before executing the next retry, specified as duration in milliseconds. If provided, it will override the default retry policy used by Restate's invoker ONLY for the next retry attempt.
optional uint64 next_retry_delay = 8;
- Returns:
- This builder for chaining.
-