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

Instance Method Details

#add(process) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/lepus/process_registry/backend.rb', line 16

def add(process)
  raise NotImplementedError, "#{self.class}#add must be implemented"
end

#allObject

Raises:

  • (NotImplementedError)


36
37
38
# File 'lib/lepus/process_registry/backend.rb', line 36

def all
  raise NotImplementedError, "#{self.class}#all must be implemented"
end

#clearObject

Raises:

  • (NotImplementedError)


44
45
46
# File 'lib/lepus/process_registry/backend.rb', line 44

def clear
  raise NotImplementedError, "#{self.class}#clear must be implemented"
end

#countObject

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/lepus/process_registry/backend.rb', line 28

def find(id)
  raise NotImplementedError, "#{self.class}#find must be implemented"
end

#startObject

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/lepus/process_registry/backend.rb', line 8

def start
  raise NotImplementedError, "#{self.class}#start must be implemented"
end

#stopObject

Raises:

  • (NotImplementedError)


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