Class AckRequest

  • All Implemented Interfaces:
    AckRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class AckRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements AckRequestOrBuilder
    Protobuf type blipai.deckard.AckRequest
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AckRequest.Builder
      Protobuf type blipai.deckard.AckRequest
      • 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
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(Object obj)  
      String getBreakpoint()
      Breakpoint is a field to be used as an auxiliar field for some specific use cases.
      com.google.protobuf.ByteString getBreakpointBytes()
      Breakpoint is a field to be used as an auxiliar field for some specific use cases.
      static AckRequest getDefaultInstance()  
      AckRequest getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      String getId()
      ID of the message
      com.google.protobuf.ByteString getIdBytes()
      ID of the message
      long getLockMs()
      Time in milliseconds to lock a message before returning it to the queue.
      com.google.protobuf.Parser<AckRequest> getParserForType()  
      String getQueue()
      Queue where this message is stored
      com.google.protobuf.ByteString getQueueBytes()
      Queue where this message is stored
      String getReason()
      Reason of this result.
      com.google.protobuf.ByteString getReasonBytes()
      Reason of this result.
      boolean getRemoveMessage()
      Whether the message should be removed when acked/nacked
      double getScore()
      Sets the score of the message when ACKed, to override the default score algorithm.
      double getScoreSubtract()
      Deprecated.
      blipai.deckard.AckRequest.score_subtract is deprecated.
      int getSerializedSize()  
      int hashCode()  
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static AckRequest.Builder newBuilder()  
      static AckRequest.Builder newBuilder​(AckRequest prototype)  
      AckRequest.Builder newBuilderForType()  
      protected AckRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static AckRequest parseDelimitedFrom​(InputStream input)  
      static AckRequest parseDelimitedFrom​(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static AckRequest parseFrom​(byte[] data)  
      static AckRequest parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static AckRequest parseFrom​(com.google.protobuf.ByteString data)  
      static AckRequest parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static AckRequest parseFrom​(com.google.protobuf.CodedInputStream input)  
      static AckRequest parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static AckRequest parseFrom​(InputStream input)  
      static AckRequest parseFrom​(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static AckRequest parseFrom​(ByteBuffer data)  
      static AckRequest parseFrom​(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<AckRequest> parser()  
      AckRequest.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3

        canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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 interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         ID of the message
         
        string id = 1;
        Specified by:
        getIdBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for id.
      • getQueue

        public String getQueue()
         Queue where this message is stored
         
        string queue = 2;
        Specified by:
        getQueue in interface AckRequestOrBuilder
        Returns:
        The queue.
      • getQueueBytes

        public com.google.protobuf.ByteString getQueueBytes()
         Queue where this message is stored
         
        string queue = 2;
        Specified by:
        getQueueBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for queue.
      • getReason

        public String getReason()
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Specified by:
        getReason in interface AckRequestOrBuilder
        Returns:
        The reason.
      • getReasonBytes

        public com.google.protobuf.ByteString getReasonBytes()
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Specified by:
        getReasonBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for reason.
      • getScoreSubtract

        @Deprecated
        public double getScoreSubtract()
        Deprecated.
        blipai.deckard.AckRequest.score_subtract is deprecated. See proto/deckard_service.proto;l=352
         This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field.
         
         The value to subtract the score and increase final message priority.
         For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm.
         If you want to penalize the message you can send a negative number.
         
         IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue.
         
         This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue).
         It will be ignored if used at the same time of 'score' or 'lock_ms' fields.
         
        double score_subtract = 3 [deprecated = true];
        Specified by:
        getScoreSubtract in interface AckRequestOrBuilder
        Returns:
        The scoreSubtract.
      • getBreakpoint

        public String getBreakpoint()
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
        
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Specified by:
        getBreakpoint in interface AckRequestOrBuilder
        Returns:
        The breakpoint.
      • getBreakpointBytes

        public com.google.protobuf.ByteString getBreakpointBytes()
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
        
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Specified by:
        getBreakpointBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for breakpoint.
      • getLockMs

        public long getLockMs()
         Time in milliseconds to lock a message before returning it to the queue.
         For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field.
        
         For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field.
        
         IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds.
         This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well.
         
        int64 lock_ms = 6;
        Specified by:
        getLockMs in interface AckRequestOrBuilder
        Returns:
        The lockMs.
      • getRemoveMessage

        public boolean getRemoveMessage()
         Whether the message should be removed when acked/nacked
         
        bool removeMessage = 7;
        Specified by:
        getRemoveMessage in interface AckRequestOrBuilder
        Returns:
        The removeMessage.
      • getScore

        public double getScore()
         Sets the score of the message when ACKed, to override the default score algorithm.
        
         If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score.
        
         For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds.
        
         For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0.
        
         Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request.
        
         REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped.
         
        double score = 10;
        Specified by:
        getScore in interface AckRequestOrBuilder
        Returns:
        The score.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static AckRequest parseFrom​(ByteBuffer data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AckRequest parseFrom​(ByteBuffer data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AckRequest parseFrom​(com.google.protobuf.ByteString data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AckRequest parseFrom​(com.google.protobuf.ByteString data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AckRequest parseFrom​(byte[] data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AckRequest parseFrom​(byte[] data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AckRequest parseFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Throws:
        IOException
      • newBuilderForType

        public AckRequest.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public AckRequest.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected AckRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static AckRequest getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<AckRequest> parser()
      • getParserForType

        public com.google.protobuf.Parser<AckRequest> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public AckRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder