Class: Dynflow::PersistenceAdapters::Abstract
- Inherits:
 - 
      Object
      
        
- Object
 - Dynflow::PersistenceAdapters::Abstract
 
 
- Defined in:
 - lib/dynflow/persistence_adapters/abstract.rb
 
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #logger  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The logger is set by the world when used inside it.
 
Instance Method Summary collapse
- #abort_if_pending_migrations! ⇒ Object
 - #delete_delayed_plans(filters, batch_size = 1000) ⇒ Object
 - #delete_execution_plans(filters, batch_size = 1000, backup_dir = nil) ⇒ Object
 - #delete_output_chunks(execution_plan_id, action_id) ⇒ Object
 - #filtering_by ⇒ Object
 - #find_execution_plan_counts(options = {}) ⇒ Object
 - #find_execution_plan_statuses(options) ⇒ Object
 - #find_execution_plans(options = {}) ⇒ Object
 - #find_past_delayed_plans(options = {}) ⇒ Object
 - #load_action(execution_plan_id, action_id) ⇒ Object
 - #load_actions(execution_plan_id, action_ids) ⇒ Object
 - #load_actions_attributes(execution_plan_id, attributes) ⇒ Object
 - #load_delayed_plan(execution_plan_id) ⇒ Object
 - #load_execution_plan(execution_plan_id) ⇒ Object
 - #load_output_chunks(execution_plan_id, action_id) ⇒ Object
 - #load_step(execution_plan_id, step_id) ⇒ Object
 - #log(level, message) ⇒ Object
 - #migrate_db ⇒ Object
 - #ordering_by ⇒ Object
 - #pagination? ⇒ Boolean
 - #prune_envelopes(receiver_ids) ⇒ Object
 - #prune_undeliverable_envelopes ⇒ Object
 - #pull_envelopes(receiver_id) ⇒ Object
 - #push_envelope(envelope) ⇒ Object
 - #register_world(world) ⇒ Object
 - #save_action(execution_plan_id, action_id, value) ⇒ Object
 - #save_delayed_plan(execution_plan_id, value) ⇒ Object
 - #save_execution_plan(execution_plan_id, value) ⇒ Object
 - #save_output_chunks(execution_plan_id, action_id, chunks) ⇒ Object
 - #save_step(execution_plan_id, step_id, value) ⇒ Object
 - 
  
    
      #to_hash  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
for debug purposes.
 - #transaction ⇒ Object
 
Instance Attribute Details
#logger ⇒ Object
The logger is set by the world when used inside it
      7 8 9  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 7 def logger @logger end  | 
  
Instance Method Details
#abort_if_pending_migrations! ⇒ Object
      148 149 150  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 148 def abort_if_pending_migrations! raise NotImplementedError end  | 
  
#delete_delayed_plans(filters, batch_size = 1000) ⇒ Object
      75 76 77  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 75 def delete_delayed_plans(filters, batch_size = 1000) raise NotImplementedError end  | 
  
#delete_execution_plans(filters, batch_size = 1000, backup_dir = nil) ⇒ Object
      59 60 61  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 59 def delete_execution_plans(filters, batch_size = 1000, backup_dir = nil) raise NotImplementedError end  | 
  
#delete_output_chunks(execution_plan_id, action_id) ⇒ Object
      119 120 121  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 119 def delete_output_chunks(execution_plan_id, action_id) raise NotImplementedError end  | 
  
#filtering_by ⇒ Object
      25 26 27  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 25 def filtering_by [] end  | 
  
#find_execution_plan_counts(options = {}) ⇒ Object
      45 46 47  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 45 def find_execution_plan_counts( = {}) filter(:execution_plan, [:filters]).count end  | 
  
#find_execution_plan_statuses(options) ⇒ Object
      49 50 51  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 49 def find_execution_plan_statuses() raise NotImplementedError end  | 
  
#find_execution_plans(options = {}) ⇒ Object
      39 40 41  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 39 def find_execution_plans( = {}) raise NotImplementedError end  | 
  
#find_past_delayed_plans(options = {}) ⇒ Object
      71 72 73  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 71 def find_past_delayed_plans( = {}) raise NotImplementedError end  | 
  
#load_action(execution_plan_id, action_id) ⇒ Object
      95 96 97  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 95 def load_action(execution_plan_id, action_id) raise NotImplementedError end  | 
  
#load_actions(execution_plan_id, action_ids) ⇒ Object
      103 104 105  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 103 def load_actions(execution_plan_id, action_ids) raise NotImplementedError end  | 
  
#load_actions_attributes(execution_plan_id, attributes) ⇒ Object
      99 100 101  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 99 def load_actions_attributes(execution_plan_id, attributes) raise NotImplementedError end  | 
  
#load_delayed_plan(execution_plan_id) ⇒ Object
      79 80 81  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 79 def load_delayed_plan(execution_plan_id) raise NotImplementedError end  | 
  
#load_execution_plan(execution_plan_id) ⇒ Object
      63 64 65  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 63 def load_execution_plan(execution_plan_id) raise NotImplementedError end  | 
  
#load_output_chunks(execution_plan_id, action_id) ⇒ Object
      115 116 117  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 115 def load_output_chunks(execution_plan_id, action_id) raise NotImplementedError end  | 
  
#load_step(execution_plan_id, step_id) ⇒ Object
      87 88 89  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 87 def load_step(execution_plan_id, step_id) raise NotImplementedError end  | 
  
#log(level, message) ⇒ Object
      13 14 15  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 13 def log(level, ) logger.send(level, ) if logger end  | 
  
#migrate_db ⇒ Object
      144 145 146  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 144 def migrate_db raise NotImplementedError end  | 
  
#ordering_by ⇒ Object
      29 30 31  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 29 def ordering_by [] end  | 
  
#pagination? ⇒ Boolean
      17 18 19  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 17 def pagination? false end  | 
  
#prune_envelopes(receiver_ids) ⇒ Object
      136 137 138  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 136 def prune_envelopes(receiver_ids) raise NotImplementedError end  | 
  
#prune_undeliverable_envelopes ⇒ Object
      140 141 142  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 140 def prune_undeliverable_envelopes raise NotImplementedError end  | 
  
#pull_envelopes(receiver_id) ⇒ Object
      128 129 130  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 128 def pull_envelopes(receiver_id) raise NotImplementedError end  | 
  
#push_envelope(envelope) ⇒ Object
      132 133 134  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 132 def push_envelope(envelope) raise NotImplementedError end  | 
  
#register_world(world) ⇒ Object
      9 10 11  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 9 def register_world(world) @logger ||= world.logger end  | 
  
#save_action(execution_plan_id, action_id, value) ⇒ Object
      107 108 109  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 107 def save_action(execution_plan_id, action_id, value) raise NotImplementedError end  | 
  
#save_delayed_plan(execution_plan_id, value) ⇒ Object
      83 84 85  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 83 def save_delayed_plan(execution_plan_id, value) raise NotImplementedError end  | 
  
#save_execution_plan(execution_plan_id, value) ⇒ Object
      67 68 69  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 67 def save_execution_plan(execution_plan_id, value) raise NotImplementedError end  | 
  
#save_output_chunks(execution_plan_id, action_id, chunks) ⇒ Object
      111 112 113  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 111 def save_output_chunks(execution_plan_id, action_id, chunks) raise NotImplementedError end  | 
  
#save_step(execution_plan_id, step_id, value) ⇒ Object
      91 92 93  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 91 def save_step(execution_plan_id, step_id, value) raise NotImplementedError end  | 
  
#to_hash ⇒ Object
for debug purposes
      124 125 126  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 124 def to_hash raise NotImplementedError end  | 
  
#transaction ⇒ Object
      21 22 23  | 
    
      # File 'lib/dynflow/persistence_adapters/abstract.rb', line 21 def transaction raise NotImplementedError end  |