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
AppProfile::Job, Backup::Job, Cluster::Job, Instance::Job, Table::RestoreJob
Instance Method Summary collapse
-
#done? ⇒ boolean
Checks if the processing of the instance operation is complete.
-
#error ⇒ Object, ...
The status when 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?
Gets the 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.
56 57 58 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 56 def done? @grpc.done? end |
#error ⇒ Object, ...
The status when the operation associated with this job produced an error.
76 77 78 79 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 76 def error return nil unless error? @grpc.error end |
#error? ⇒ boolean
Checks if the processing of the instance operation has errored.
65 66 67 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 65 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.
87 88 89 90 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 87 def reload! @grpc.reload! self end |
#results ⇒ Object?
Gets the result object of the operation.
45 46 47 48 49 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 45 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.
96 97 98 |
# File 'lib/google/cloud/bigtable/longrunning_job.rb', line 96 def wait_until_done! @grpc.wait_until_done! end |