Class: Papermill::Storage
- Inherits:
-
Array
- Object
- Array
- Papermill::Storage
- Includes:
- Singleton
- Defined in:
- lib/papermill-agent/storage.rb
Overview
The Storage class inherits from Array, and thus can be used in a very simple and predictable way. This is used by the Collector to save requests until they are ready to be sent to the remote server, which is handled by the Agent class.
Class Method Summary collapse
- .clear ⇒ Object
- .empty? ⇒ Boolean
- .size ⇒ Object
-
.store ⇒ Object
TODO: We need a mutex sync around adding items to storage.
Class Method Details
.clear ⇒ Object
19 20 21 |
# File 'lib/papermill-agent/storage.rb', line 19 def clear store.clear end |
.empty? ⇒ Boolean
27 28 29 |
# File 'lib/papermill-agent/storage.rb', line 27 def empty? store.empty? end |
.size ⇒ Object
23 24 25 |
# File 'lib/papermill-agent/storage.rb', line 23 def size store.size end |
.store ⇒ Object
TODO: We need a mutex sync around adding items to storage
15 16 17 |
# File 'lib/papermill-agent/storage.rb', line 15 def store instance end |