Class: Google::Cloud::PubSub::AcknowledgeResult
- Inherits:
-
Object
- Object
- Google::Cloud::PubSub::AcknowledgeResult
- Defined in:
- lib/google/cloud/pubsub/acknowledge_result.rb
Overview
The result of a ack/nack/modack on messages.
When the operation was successful the result will be marked #succeeded?. Otherwise, the result will be marked #failed? and the error raised will be availabe on #error.
Constant Summary collapse
- SUCCESS =
The constants below represents the status of ack/modack operations. Indicates successful ack/modack
1
- PERMISSION_DENIED =
Indicates occurence of permenant permission denied error
2
- FAILED_PRECONDITION =
Indicates occurence of permenant failed precondition error
3
- INVALID_ACK_ID =
Indicates occurence of permenant permission denied error
4
- OTHER =
Indicates occurence of permenant uncatogorised error
5
Instance Attribute Summary collapse
-
#error ⇒ Google::Cloud::Error
readonly
Error object of ack/modack operation.
-
#status ⇒ Numeric
readonly
Status of the ack/modack operation.
Instance Method Summary collapse
-
#failed? ⇒ Boolean
Whether the operation failed.
-
#succeeded? ⇒ Boolean
Whether the operation was successful.
Instance Attribute Details
#error ⇒ Google::Cloud::Error (readonly)
Returns Error object of ack/modack operation.
50 51 52 |
# File 'lib/google/cloud/pubsub/acknowledge_result.rb', line 50 def error @error end |
#status ⇒ Numeric (readonly)
Returns Status of the ack/modack operation.
54 55 56 |
# File 'lib/google/cloud/pubsub/acknowledge_result.rb', line 54 def status @status end |
Instance Method Details
#failed? ⇒ Boolean
Returns Whether the operation failed.
71 72 73 |
# File 'lib/google/cloud/pubsub/acknowledge_result.rb', line 71 def failed? !succeeded? end |
#succeeded? ⇒ Boolean
Returns Whether the operation was successful.
65 66 67 |
# File 'lib/google/cloud/pubsub/acknowledge_result.rb', line 65 def succeeded? @status == SUCCESS end |