Class: Google::Cloud::Bigtable::LongrunningJob
- Inherits:
-
Object
- Object
- Google::Cloud::Bigtable::LongrunningJob
- Defined in:
- lib/google/cloud/bigtable/longrunning_job.rb
Overview
LongrunningJob
A resource representing the long-running, asynchronous processing operation. The job can be refreshed to retrieve the result object once the operation has been completed.
Direct Known Subclasses
Instance Method Summary collapse
-
#done? ⇒ boolean
Checks if the processing of the instance operation is complete.
-
#error ⇒ Object, ...
The status if the operation associated with this job produced an error.
-
#error? ⇒ boolean
Checks if the processing of the instance operation has errored.
-
#reload! ⇒ Google::Cloud::Bigtable::Instance::Job
Reloads the job with current data from the long-running, asynchronous processing of an operation.
-
#results ⇒ Object?
Get result object of the operation.
-
#wait_until_done! ⇒ Object
Reloads the job until the operation is complete.
Instance Method Details
#done? ⇒ boolean
Checks if the processing of the instance operation is complete.
53 54 55 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 53 def done? @grpc.done? end |
#error ⇒ Object, ...
The status if the operation associated with this job produced an error.
72 73 74 75 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 72 def error return nil unless error? @grpc.error end |
#error? ⇒ boolean
Checks if the processing of the instance operation has errored.
61 62 63 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 61 def error? @grpc.error? end |
#reload! ⇒ Google::Cloud::Bigtable::Instance::Job
Reloads the job with current data from the long-running, asynchronous processing of an operation.
82 83 84 85 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 82 def reload! @grpc.reload! self end |
#results ⇒ Object?
Get result object of the operation.
43 44 45 46 47 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 43 def results return nil unless done? return nil unless @grpc.grpc_op.result == :response @grpc.results end |
#wait_until_done! ⇒ Object
Reloads the job until the operation is complete. The delay between reloads will incrementally increase.
90 91 92 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 90 def wait_until_done! @grpc.wait_until_done! end |