Class Error.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Error.Builder>
com.google.protobuf.GeneratedMessage.Builder<Error.Builder>
dev.restate.ingestion.v1.Error.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ErrorOrBuilder, Cloneable
Enclosing class:
Error

public static final class Error.Builder extends com.google.protobuf.GeneratedMessage.Builder<Error.Builder> implements ErrorOrBuilder
An error frame. It is always the last frame of the stream: whether the
error is stream-scoped or record-scoped, the server tears the stream down
right after sending it and processes no further messages.

Record-scoped errors are the ones that carry `invocation_offset`: the
record at that offset was rejected (for example a missing key, an unknown
handler, or an internal ingestion failure) while the stream itself is
still well-formed. Stream-scoped errors leave `invocation_offset` unset
and describe a condition of the stream as a whole (shutdown, a protocol
violation, or invalid `Start`/`IngestionDefaults`).

Even a record-scoped error terminates the stream, on purpose. Skipping the
faulty record and continuing would commit the records that follow it and
move the deduplication high water mark past the failed offset, making it
impossible to ever ingest that record afterwards. Terminating instead
keeps the high water mark where it is and leaves the decision to the
client.

Recovery is therefore the client's responsibility: reconnect with the same
producer ID, resume from the `last_committed` reported on the response
that carried this error, and skip (or fix) the offending record before
resending the rest. Note that records after the failed offset may have
already been sent by the client but were not committed; they must be
resent.
Protobuf type dev.restate.ingress.ingestion.v1.Error
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    if set, the error is associated with the invocation with that offset
    .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
    string message = 3;
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    long
    if set, the error is associated with the invocation with that offset
    .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
    int
    .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
    string message = 3;
    com.google.protobuf.ByteString
    string message = 3;
    boolean
    if set, the error is associated with the invocation with that offset
    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)
     
     
    setInvocationOffset(long value)
    if set, the error is associated with the invocation with that offset
    .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
    setKindValue(int value)
    .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
    string message = 3;
    setMessageBytes(com.google.protobuf.ByteString value)
    string message = 3;

    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 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 class com.google.protobuf.GeneratedMessage.Builder<Error.Builder>
    • clear

      public Error.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Error.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Error.Builder>
    • getDefaultInstanceForType

      public Error getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Error build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Error buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Error.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Error.Builder>
    • mergeFrom

      public Error.Builder mergeFrom(Error other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Error.Builder>
    • mergeFrom

      public Error.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Error.Builder>
      Throws:
      IOException
    • hasInvocationOffset

      public boolean hasInvocationOffset()
      if set, the error is associated
      with the invocation with that offset
      
      optional uint64 invocation_offset = 1;
      Specified by:
      hasInvocationOffset in interface ErrorOrBuilder
      Returns:
      Whether the invocationOffset field is set.
    • getInvocationOffset

      public long getInvocationOffset()
      if set, the error is associated
      with the invocation with that offset
      
      optional uint64 invocation_offset = 1;
      Specified by:
      getInvocationOffset in interface ErrorOrBuilder
      Returns:
      The invocationOffset.
    • setInvocationOffset

      public Error.Builder setInvocationOffset(long value)
      if set, the error is associated
      with the invocation with that offset
      
      optional uint64 invocation_offset = 1;
      Parameters:
      value - The invocationOffset to set.
      Returns:
      This builder for chaining.
    • clearInvocationOffset

      public Error.Builder clearInvocationOffset()
      if set, the error is associated
      with the invocation with that offset
      
      optional uint64 invocation_offset = 1;
      Returns:
      This builder for chaining.
    • getKindValue

      public int getKindValue()
      .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
      Specified by:
      getKindValue in interface ErrorOrBuilder
      Returns:
      The enum numeric value on the wire for kind.
    • setKindValue

      public Error.Builder setKindValue(int value)
      .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
      Parameters:
      value - The enum numeric value on the wire for kind to set.
      Returns:
      This builder for chaining.
    • getKind

      public ErrorKind getKind()
      .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
      Specified by:
      getKind in interface ErrorOrBuilder
      Returns:
      The kind.
    • setKind

      public Error.Builder setKind(ErrorKind value)
      .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
      Parameters:
      value - The kind to set.
      Returns:
      This builder for chaining.
    • clearKind

      public Error.Builder clearKind()
      .dev.restate.ingress.ingestion.v1.ErrorKind kind = 2;
      Returns:
      This builder for chaining.
    • getMessage

      public String getMessage()
      string message = 3;
      Specified by:
      getMessage in interface ErrorOrBuilder
      Returns:
      The message.
    • getMessageBytes

      public com.google.protobuf.ByteString getMessageBytes()
      string message = 3;
      Specified by:
      getMessageBytes in interface ErrorOrBuilder
      Returns:
      The bytes for message.
    • setMessage

      public Error.Builder setMessage(String value)
      string message = 3;
      Parameters:
      value - The message to set.
      Returns:
      This builder for chaining.
    • clearMessage

      public Error.Builder clearMessage()
      string message = 3;
      Returns:
      This builder for chaining.
    • setMessageBytes

      public Error.Builder setMessageBytes(com.google.protobuf.ByteString value)
      string message = 3;
      Parameters:
      value - The bytes for message to set.
      Returns:
      This builder for chaining.