Package ai.blip.deckard
Class AckRequest
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- ai.blip.deckard.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 typeblipai.deckard.AckRequest- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAckRequest.BuilderProtobuf typeblipai.deckard.AckRequest-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intBREAKPOINT_FIELD_NUMBERstatic intID_FIELD_NUMBERstatic intLOCK_MS_FIELD_NUMBERstatic intQUEUE_FIELD_NUMBERstatic intREASON_FIELD_NUMBERstatic intREMOVEMESSAGE_FIELD_NUMBERstatic intSCORE_FIELD_NUMBERstatic intSCORE_SUBTRACT_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)StringgetBreakpoint()Breakpoint is a field to be used as an auxiliar field for some specific use cases.com.google.protobuf.ByteStringgetBreakpointBytes()Breakpoint is a field to be used as an auxiliar field for some specific use cases.static AckRequestgetDefaultInstance()AckRequestgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetId()ID of the messagecom.google.protobuf.ByteStringgetIdBytes()ID of the messagelonggetLockMs()Time in milliseconds to lock a message before returning it to the queue.com.google.protobuf.Parser<AckRequest>getParserForType()StringgetQueue()Queue where this message is storedcom.google.protobuf.ByteStringgetQueueBytes()Queue where this message is storedStringgetReason()Reason of this result.com.google.protobuf.ByteStringgetReasonBytes()Reason of this result.booleangetRemoveMessage()Whether the message should be removed when acked/nackeddoublegetScore()Sets the score of the message when ACKed, to override the default score algorithm.doublegetScoreSubtract()Deprecated.intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static AckRequest.BuildernewBuilder()static AckRequest.BuildernewBuilder(AckRequest prototype)AckRequest.BuildernewBuilderForType()protected AckRequest.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static AckRequestparseDelimitedFrom(InputStream input)static AckRequestparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static AckRequestparseFrom(byte[] data)static AckRequestparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static AckRequestparseFrom(com.google.protobuf.ByteString data)static AckRequestparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static AckRequestparseFrom(com.google.protobuf.CodedInputStream input)static AckRequestparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static AckRequestparseFrom(InputStream input)static AckRequestparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static AckRequestparseFrom(ByteBuffer data)static AckRequestparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<AckRequest>parser()AckRequest.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, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
QUEUE_FIELD_NUMBER
public static final int QUEUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REASON_FIELD_NUMBER
public static final int REASON_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCORE_SUBTRACT_FIELD_NUMBER
public static final int SCORE_SUBTRACT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BREAKPOINT_FIELD_NUMBER
public static final int BREAKPOINT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOCK_MS_FIELD_NUMBER
public static final int LOCK_MS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REMOVEMESSAGE_FIELD_NUMBER
public static final int REMOVEMESSAGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCORE_FIELD_NUMBER
public static final int SCORE_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
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getId
public String getId()
ID of the message
string id = 1;- Specified by:
getIdin interfaceAckRequestOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()
ID of the message
string id = 1;- Specified by:
getIdBytesin interfaceAckRequestOrBuilder- Returns:
- The bytes for id.
-
getQueue
public String getQueue()
Queue where this message is stored
string queue = 2;- Specified by:
getQueuein interfaceAckRequestOrBuilder- Returns:
- The queue.
-
getQueueBytes
public com.google.protobuf.ByteString getQueueBytes()
Queue where this message is stored
string queue = 2;- Specified by:
getQueueBytesin interfaceAckRequestOrBuilder- 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:
getReasonin interfaceAckRequestOrBuilder- 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:
getReasonBytesin interfaceAckRequestOrBuilder- Returns:
- The bytes for reason.
-
getScoreSubtract
@Deprecated public double getScoreSubtract()
Deprecated.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:
getScoreSubtractin interfaceAckRequestOrBuilder- 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:
getBreakpointin interfaceAckRequestOrBuilder- 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:
getBreakpointBytesin interfaceAckRequestOrBuilder- 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:
getLockMsin interfaceAckRequestOrBuilder- Returns:
- The lockMs.
-
getRemoveMessage
public boolean getRemoveMessage()
Whether the message should be removed when acked/nacked
bool removeMessage = 7;- Specified by:
getRemoveMessagein interfaceAckRequestOrBuilder- 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:
getScorein interfaceAckRequestOrBuilder- Returns:
- The score.
-
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 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(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static AckRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static AckRequest parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static AckRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static AckRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static AckRequest.Builder newBuilder()
-
newBuilder
public static AckRequest.Builder newBuilder(AckRequest prototype)
-
toBuilder
public AckRequest.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected AckRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.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:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public AckRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-