Module: Lepus::ProcessRegistry::Backend
- Included in:
- FileBackend, RabbitmqBackend
- Defined in:
- lib/lepus/process_registry/backend.rb
Overview
Abstract backend interface for process registry storage. Implementations must provide all methods defined here.
Instance Method Summary collapse
- #add(process) ⇒ Object
- #all ⇒ Object
- #clear ⇒ Object
- #count ⇒ Object
- #delete(process) ⇒ Object
- #exists?(id) ⇒ Boolean
- #find(id) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #update(process, metrics: {}) ⇒ Object
Instance Method Details
#add(process) ⇒ Object
16 17 18 |
# File 'lib/lepus/process_registry/backend.rb', line 16 def add(process) raise NotImplementedError, "#{self.class}#add must be implemented" end |
#all ⇒ Object
36 37 38 |
# File 'lib/lepus/process_registry/backend.rb', line 36 def all raise NotImplementedError, "#{self.class}#all must be implemented" end |
#clear ⇒ Object
44 45 46 |
# File 'lib/lepus/process_registry/backend.rb', line 44 def clear raise NotImplementedError, "#{self.class}#clear must be implemented" end |
#count ⇒ Object
40 41 42 |
# File 'lib/lepus/process_registry/backend.rb', line 40 def count raise NotImplementedError, "#{self.class}#count must be implemented" end |
#delete(process) ⇒ Object
24 25 26 |
# File 'lib/lepus/process_registry/backend.rb', line 24 def delete(process) raise NotImplementedError, "#{self.class}#delete must be implemented" end |
#exists?(id) ⇒ Boolean
32 33 34 |
# File 'lib/lepus/process_registry/backend.rb', line 32 def exists?(id) raise NotImplementedError, "#{self.class}#exists? must be implemented" end |
#find(id) ⇒ Object
28 29 30 |
# File 'lib/lepus/process_registry/backend.rb', line 28 def find(id) raise NotImplementedError, "#{self.class}#find must be implemented" end |
#start ⇒ Object
8 9 10 |
# File 'lib/lepus/process_registry/backend.rb', line 8 def start raise NotImplementedError, "#{self.class}#start must be implemented" end |
#stop ⇒ Object
12 13 14 |
# File 'lib/lepus/process_registry/backend.rb', line 12 def stop raise NotImplementedError, "#{self.class}#stop must be implemented" end |
#update(process, metrics: {}) ⇒ Object
20 21 22 |
# File 'lib/lepus/process_registry/backend.rb', line 20 def update(process, metrics: {}) add(process, metrics: metrics) end |