Class: Papermill::Storage

Inherits:
Array
  • Object
show all
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

Class Method Details

.clearObject



19
20
21
# File 'lib/papermill-agent/storage.rb', line 19

def clear
  store.clear
end

.empty?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/papermill-agent/storage.rb', line 27

def empty?
  store.empty?
end

.sizeObject



23
24
25
# File 'lib/papermill-agent/storage.rb', line 23

def size
  store.size
end

.storeObject

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