Class: Dynflow::PersistenceAdapters::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/dynflow/persistence_adapters/abstract.rb

Direct Known Subclasses

Sequel

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#loggerObject

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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Parameters:

  • filters (Hash{ String => Object })

    filters to determine what to delete

  • batch_size (defaults to: 1000)

    the size of the chunks to iterate over when performing the deletion

  • backup_dir (defaults to: nil)

    where the backup of deleted plans will be created. Set to nil for no backup

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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_byObject



25
26
27
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 25

def filtering_by
  []
end

#find_execution_plan_counts(options = {}) ⇒ Object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • filters (Hash{ String => Object,Array<object> })

    hash represents set of allowed values for a given key representing column



45
46
47
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 45

def find_execution_plan_counts(options = {})
  filter(:execution_plan, options[:filters]).count
end

#find_execution_plan_statuses(options) ⇒ Object

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 49

def find_execution_plan_statuses(options)
  raise NotImplementedError
end

#find_execution_plans(options = {}) ⇒ Object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • page (Integer)

    index of the page (starting at 0)

  • per_page (Integer)

    the number of the items on page

  • order_by (Symbol)

    name of the column to use for ordering

  • desc (true, false)

    set to true if order should be descending

  • filters (Hash{ String => Object,Array<object> })

    hash represents set of allowed values for a given key representing column

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 39

def find_execution_plans(options = {})
  raise NotImplementedError
end

#find_past_delayed_plans(options = {}) ⇒ Object

Raises:

  • (NotImplementedError)


71
72
73
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 71

def find_past_delayed_plans(options = {})
  raise NotImplementedError
end

#load_action(execution_plan_id, action_id) ⇒ Object

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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, message)
  logger.send(level, message) if logger
end

#migrate_dbObject

Raises:

  • (NotImplementedError)


144
145
146
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 144

def migrate_db
  raise NotImplementedError
end

#ordering_byObject



29
30
31
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 29

def ordering_by
  []
end

#pagination?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 17

def pagination?
  false
end

#prune_envelopes(receiver_ids) ⇒ Object

Raises:

  • (NotImplementedError)


136
137
138
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 136

def prune_envelopes(receiver_ids)
  raise NotImplementedError
end

#prune_undeliverable_envelopesObject

Raises:

  • (NotImplementedError)


140
141
142
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 140

def prune_undeliverable_envelopes
  raise NotImplementedError
end

#pull_envelopes(receiver_id) ⇒ Object

Raises:

  • (NotImplementedError)


128
129
130
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 128

def pull_envelopes(receiver_id)
  raise NotImplementedError
end

#push_envelope(envelope) ⇒ Object

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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_hashObject

for debug purposes

Raises:

  • (NotImplementedError)


124
125
126
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 124

def to_hash
  raise NotImplementedError
end

#transactionObject

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 21

def transaction
  raise NotImplementedError
end