Class: OpenWFE::InMemoryHistory
- Inherits:
-
BaseHistory
- Object
- BaseHistory
- OpenWFE::InMemoryHistory
- Defined in:
- lib/openwfe/expool/history.rb
Overview
The simplest implementation, stores all history entries in memory.
DO NOT USE IN PRODUCTION, it will trigger an ‘out of memory’ error sooner or later.
Is only used for unit testing purposes.
Instance Attribute Summary
Attributes included from ServiceMixin
Attributes included from Contextual
Instance Method Summary collapse
-
#entries ⇒ Object
Returns the array of entries.
-
#initialize(service_name, application_context) ⇒ InMemoryHistory
constructor
A new instance of InMemoryHistory.
-
#to_s ⇒ Object
Returns all the entries as a String.
Methods inherited from BaseHistory
Methods included from HistoryMixin
Methods included from ServiceMixin
Methods included from Contextual
#get_work_directory, #init_service, #lookup
Methods included from Logging
#ldebug, #ldebug_callstack, #lerror, #lfatal, #linfo, #llog, #lunknown, #lwarn
Methods included from OwfeServiceLocator
#get_engine, #get_error_journal, #get_expool, #get_expression_map, #get_expression_pool, #get_expression_storage, #get_expression_storages, #get_journal, #get_participant_map, #get_scheduler, #get_wfid_generator
Constructor Details
#initialize(service_name, application_context) ⇒ InMemoryHistory
Returns a new instance of InMemoryHistory.
118 119 120 121 122 |
# File 'lib/openwfe/expool/history.rb', line 118 def initialize (service_name, application_context) super @output = [] end |
Instance Method Details
#entries ⇒ Object
Returns the array of entries.
127 128 129 |
# File 'lib/openwfe/expool/history.rb', line 127 def entries @output end |
#to_s ⇒ Object
Returns all the entries as a String.
134 135 136 137 138 139 140 |
# File 'lib/openwfe/expool/history.rb', line 134 def to_s s = "" @output.each do |entry| s << entry.to_s end s end |