Class: Google::Cloud::Spanner::Instance::Job
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Cloud::Spanner::Instance::Job
 
 
- Defined in:
 - lib/google/cloud/spanner/instance/job.rb
 
Overview
Job
A resource representing the long-running, asynchronous processing of an instance create or update operation. The job can be refreshed to retrieve the instance object once the operation has been completed.
See Project#create_instance and #update.
Instance Method Summary collapse
- 
  
    
      #done?  ⇒ boolean 
    
    
  
  
  
  
  
  
  
  
  
    
Checks if the processing of the instance operation is complete.
 - 
  
    
      #error?  ⇒ boolean 
    
    
  
  
  
  
  
  
  
  
  
    
Checks if the processing of the instance operation has errored.
 - 
  
    
      #instance  ⇒ Google::Cloud::Spanner::Instance? 
    
    
  
  
  
  
  
  
  
  
  
    
The instance that is the object of the operation.
 - 
  
    
      #reload!  ⇒ Google::Cloud::Spanner::Instance::Job 
    
    
      (also: #refresh!)
    
  
  
  
  
  
  
  
  
  
    
Reloads the job with current data from the long-running, asynchronous processing of an instance 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.
      108 109 110  | 
    
      # File 'lib/google/cloud/spanner/instance/job.rb', line 108 def done? @grpc.done? end  | 
  
#error? ⇒ boolean
Checks if the processing of the instance operation has errored.
      130 131 132  | 
    
      # File 'lib/google/cloud/spanner/instance/job.rb', line 130 def error? @grpc.error? end  | 
  
#instance ⇒ Google::Cloud::Spanner::Instance?
The instance that is the object of the operation.
      84 85 86 87 88  | 
    
      # File 'lib/google/cloud/spanner/instance/job.rb', line 84 def instance return nil unless done? return nil unless @grpc.grpc_op.result == :response Instance.from_grpc @grpc.results, service end  | 
  
#reload! ⇒ Google::Cloud::Spanner::Instance::Job Also known as: refresh!
Reloads the job with current data from the long-running, asynchronous processing of an instance operation.
      156 157 158 159  | 
    
      # File 'lib/google/cloud/spanner/instance/job.rb', line 156 def reload! @grpc.reload! self end  | 
  
#wait_until_done! ⇒ Object
Reloads the job until the operation is complete. The delay between reloads will incrementally increase.
      181 182 183  | 
    
      # File 'lib/google/cloud/spanner/instance/job.rb', line 181 def wait_until_done! @grpc.wait_until_done! end  |