Class: Fluent::Plugin::Storage
Constant Summary
collapse
- DEFAULT_TYPE =
'local'
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary collapse
Attributes inherited from Base
#under_plugin_development
Class Method Summary
collapse
Instance Method Summary
collapse
#owner, #owner=
Methods inherited from Base
#acquire_worker_lock, #after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #called_in_test?, #close, #closed?, #configure, #configured?, #context_router, #context_router=, #fluentd_worker_id, #get_lock_path, #has_router?, #initialize, #inspect, #multi_workers_ready?, #plugin_root_dir, #reloadable_plugin?, #shutdown, #shutdown?, #start, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?
#system_config, #system_config_override
#config, #configure, #configure_proxy_generate, #configured_section_create, included, #initialize, lookup_type, register_type
Instance Attribute Details
#log ⇒ Object
Returns the value of attribute log.
39
40
41
|
# File 'lib/fluent/plugin/storage.rb', line 39
def log
@log
end
|
Class Method Details
.validate_key(key) ⇒ Object
34
35
36
37
|
# File 'lib/fluent/plugin/storage.rb', line 34
def self.validate_key(key)
raise ArgumentError, "key must be a string (or symbol for to_s)" unless key.is_a?(String) || key.is_a?(Symbol)
key.to_s
end
|
Instance Method Details
#delete(key) ⇒ Object
74
75
76
77
|
# File 'lib/fluent/plugin/storage.rb', line 74
def delete(key)
raise NotImplementedError, "Implement this method in child class"
end
|
#fetch(key, defval) ⇒ Object
65
66
67
|
# File 'lib/fluent/plugin/storage.rb', line 65
def fetch(key, defval)
raise NotImplementedError, "Implement this method in child class"
end
|
#get(key) ⇒ Object
61
62
63
|
# File 'lib/fluent/plugin/storage.rb', line 61
def get(key)
raise NotImplementedError, "Implement this method in child class"
end
|
#implementation ⇒ Object
49
50
51
|
# File 'lib/fluent/plugin/storage.rb', line 49
def implementation
self
end
|
#load ⇒ Object
53
54
55
|
# File 'lib/fluent/plugin/storage.rb', line 53
def load
end
|
#persistent_always? ⇒ Boolean
41
42
43
|
# File 'lib/fluent/plugin/storage.rb', line 41
def persistent_always?
false
end
|
#put(key, value) ⇒ Object
69
70
71
72
|
# File 'lib/fluent/plugin/storage.rb', line 69
def put(key, value)
raise NotImplementedError, "Implement this method in child class"
end
|
#save ⇒ Object
57
58
59
|
# File 'lib/fluent/plugin/storage.rb', line 57
def save
end
|
#synchronized? ⇒ Boolean
45
46
47
|
# File 'lib/fluent/plugin/storage.rb', line 45
def synchronized?
false
end
|
#update(key, &block) ⇒ Object
transactional get-and-update
79
80
81
|
# File 'lib/fluent/plugin/storage.rb', line 79
def update(key, &block) raise NotImplementedError, "Implement this method in child class"
end
|