Package ai.blip.deckard
Class AckRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
- ai.blip.deckard.AckRequest.Builder
-
- All Implemented Interfaces:
AckRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- AckRequest
public static final class AckRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder> implements AckRequestOrBuilder
Protobuf typeblipai.deckard.AckRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AckRequest.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)AckRequestbuild()AckRequestbuildPartial()AckRequest.Builderclear()AckRequest.BuilderclearBreakpoint()Breakpoint is a field to be used as an auxiliar field for some specific use cases.AckRequest.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)AckRequest.BuilderclearId()ID of the messageAckRequest.BuilderclearLockMs()Time in milliseconds to lock a message before returning it to the queue.AckRequest.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)AckRequest.BuilderclearQueue()Queue where this message is storedAckRequest.BuilderclearReason()Reason of this result.AckRequest.BuilderclearRemoveMessage()Whether the message should be removed when acked/nackedAckRequest.BuilderclearScore()Sets the score of the message when ACKed, to override the default score algorithm.AckRequest.BuilderclearScoreSubtract()Deprecated.AckRequest.Builderclone()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.AckRequestgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()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.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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()AckRequest.BuildermergeFrom(AckRequest other)AckRequest.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)AckRequest.BuildermergeFrom(com.google.protobuf.Message other)AckRequest.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)AckRequest.BuildersetBreakpoint(String value)Breakpoint is a field to be used as an auxiliar field for some specific use cases.AckRequest.BuildersetBreakpointBytes(com.google.protobuf.ByteString value)Breakpoint is a field to be used as an auxiliar field for some specific use cases.AckRequest.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)AckRequest.BuildersetId(String value)ID of the messageAckRequest.BuildersetIdBytes(com.google.protobuf.ByteString value)ID of the messageAckRequest.BuildersetLockMs(long value)Time in milliseconds to lock a message before returning it to the queue.AckRequest.BuildersetQueue(String value)Queue where this message is storedAckRequest.BuildersetQueueBytes(com.google.protobuf.ByteString value)Queue where this message is storedAckRequest.BuildersetReason(String value)Reason of this result.AckRequest.BuildersetReasonBytes(com.google.protobuf.ByteString value)Reason of this result.AckRequest.BuildersetRemoveMessage(boolean value)Whether the message should be removed when acked/nackedAckRequest.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)AckRequest.BuildersetScore(double value)Sets the score of the message when ACKed, to override the default score algorithm.AckRequest.BuildersetScoreSubtract(double value)Deprecated.AckRequest.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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
-
-
-
-
Method Detail
-
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.Builder<AckRequest.Builder>
-
clear
public AckRequest.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
getDefaultInstanceForType
public AckRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public AckRequest build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public AckRequest buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public AckRequest.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
setField
public AckRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
clearField
public AckRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
clearOneof
public AckRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
setRepeatedField
public AckRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
addRepeatedField
public AckRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
mergeFrom
public AckRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AckRequest.Builder>
-
mergeFrom
public AckRequest.Builder mergeFrom(AckRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
mergeFrom
public AckRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AckRequest.Builder>- Throws:
IOException
-
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.
-
setId
public AckRequest.Builder setId(String value)
ID of the message
string id = 1;- Parameters:
value- The id to set.- Returns:
- This builder for chaining.
-
clearId
public AckRequest.Builder clearId()
ID of the message
string id = 1;- Returns:
- This builder for chaining.
-
setIdBytes
public AckRequest.Builder setIdBytes(com.google.protobuf.ByteString value)
ID of the message
string id = 1;- Parameters:
value- The bytes for id to set.- Returns:
- This builder for chaining.
-
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.
-
setQueue
public AckRequest.Builder setQueue(String value)
Queue where this message is stored
string queue = 2;- Parameters:
value- The queue to set.- Returns:
- This builder for chaining.
-
clearQueue
public AckRequest.Builder clearQueue()
Queue where this message is stored
string queue = 2;- Returns:
- This builder for chaining.
-
setQueueBytes
public AckRequest.Builder setQueueBytes(com.google.protobuf.ByteString value)
Queue where this message is stored
string queue = 2;- Parameters:
value- The bytes for queue to set.- Returns:
- This builder for chaining.
-
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.
-
setReason
public AckRequest.Builder setReason(String value)
Reason of this result. Useful for audit, mostly on 'nack' signals.
string reason = 5;- Parameters:
value- The reason to set.- Returns:
- This builder for chaining.
-
clearReason
public AckRequest.Builder clearReason()
Reason of this result. Useful for audit, mostly on 'nack' signals.
string reason = 5;- Returns:
- This builder for chaining.
-
setReasonBytes
public AckRequest.Builder setReasonBytes(com.google.protobuf.ByteString value)
Reason of this result. Useful for audit, mostly on 'nack' signals.
string reason = 5;- Parameters:
value- The bytes for reason to set.- Returns:
- This builder for chaining.
-
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.
-
setScoreSubtract
@Deprecated public AckRequest.Builder setScoreSubtract(double value)
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];- Parameters:
value- The scoreSubtract to set.- Returns:
- This builder for chaining.
-
clearScoreSubtract
@Deprecated public AckRequest.Builder clearScoreSubtract()
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];- Returns:
- This builder for chaining.
-
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.
-
setBreakpoint
public AckRequest.Builder setBreakpoint(String value)
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;- Parameters:
value- The breakpoint to set.- Returns:
- This builder for chaining.
-
clearBreakpoint
public AckRequest.Builder clearBreakpoint()
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;- Returns:
- This builder for chaining.
-
setBreakpointBytes
public AckRequest.Builder setBreakpointBytes(com.google.protobuf.ByteString value)
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;- Parameters:
value- The bytes for breakpoint to set.- Returns:
- This builder for chaining.
-
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.
-
setLockMs
public AckRequest.Builder setLockMs(long value)
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;- Parameters:
value- The lockMs to set.- Returns:
- This builder for chaining.
-
clearLockMs
public AckRequest.Builder clearLockMs()
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;- Returns:
- This builder for chaining.
-
getRemoveMessage
public boolean getRemoveMessage()
Whether the message should be removed when acked/nacked
bool removeMessage = 7;- Specified by:
getRemoveMessagein interfaceAckRequestOrBuilder- Returns:
- The removeMessage.
-
setRemoveMessage
public AckRequest.Builder setRemoveMessage(boolean value)
Whether the message should be removed when acked/nacked
bool removeMessage = 7;- Parameters:
value- The removeMessage to set.- Returns:
- This builder for chaining.
-
clearRemoveMessage
public AckRequest.Builder clearRemoveMessage()
Whether the message should be removed when acked/nacked
bool removeMessage = 7;- Returns:
- This builder for chaining.
-
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.
-
setScore
public AckRequest.Builder setScore(double value)
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;- Parameters:
value- The score to set.- Returns:
- This builder for chaining.
-
clearScore
public AckRequest.Builder clearScore()
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;- Returns:
- This builder for chaining.
-
setUnknownFields
public final AckRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
mergeUnknownFields
public final AckRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
-
-