Class: Lutaml::Store::Adapter::Base
- Inherits:
-
Object
- Object
- Lutaml::Store::Adapter::Base
show all
- Defined in:
- lib/lutaml/store/adapter/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(config = {}) ⇒ Base
Returns a new instance of Base.
7
8
9
|
# File 'lib/lutaml/store/adapter/base.rb', line 7
def initialize(config = {})
@config = config
end
|
Instance Method Details
#all ⇒ Object
31
32
33
|
# File 'lib/lutaml/store/adapter/base.rb', line 31
def all
raise NotImplementedError
end
|
#bulk_delete(keys) ⇒ Object
55
56
57
|
# File 'lib/lutaml/store/adapter/base.rb', line 55
def bulk_delete(keys)
keys.each_with_object({}) { |k, h| h[k] = delete(k) }
end
|
#bulk_get(keys) ⇒ Object
47
48
49
|
# File 'lib/lutaml/store/adapter/base.rb', line 47
def bulk_get(keys)
keys.each_with_object({}) { |k, h| h[k] = get(k) }
end
|
#bulk_set(key_value_pairs) ⇒ Object
51
52
53
|
# File 'lib/lutaml/store/adapter/base.rb', line 51
def bulk_set(key_value_pairs)
key_value_pairs.each { |k, v| set(k, v) }
end
|
#clear ⇒ Object
35
36
37
|
# File 'lib/lutaml/store/adapter/base.rb', line 35
def clear
raise NotImplementedError
end
|
#close ⇒ Object
43
44
45
|
# File 'lib/lutaml/store/adapter/base.rb', line 43
def close
end
|
#delete(key) ⇒ Object
19
20
21
|
# File 'lib/lutaml/store/adapter/base.rb', line 19
def delete(key)
raise NotImplementedError
end
|
#exists?(key) ⇒ Boolean
23
24
25
|
# File 'lib/lutaml/store/adapter/base.rb', line 23
def exists?(key)
raise NotImplementedError
end
|
#get(key) ⇒ Object
11
12
13
|
# File 'lib/lutaml/store/adapter/base.rb', line 11
def get(key)
raise NotImplementedError
end
|
#keys ⇒ Object
27
28
29
|
# File 'lib/lutaml/store/adapter/base.rb', line 27
def keys
raise NotImplementedError
end
|
#set(key, value) ⇒ Object
15
16
17
|
# File 'lib/lutaml/store/adapter/base.rb', line 15
def set(key, value)
raise NotImplementedError
end
|
#size ⇒ Object
39
40
41
|
# File 'lib/lutaml/store/adapter/base.rb', line 39
def size
raise NotImplementedError
end
|
#stats ⇒ Object
59
60
61
|
# File 'lib/lutaml/store/adapter/base.rb', line 59
def stats
{ adapter: self.class.name }
end
|