Class: ErrorStalker::Store::Base
- Inherits:
-
Object
- Object
- ErrorStalker::Store::Base
- Defined in:
- lib/error_stalker/store/base.rb
Overview
The base store that all other exception stores should inherit from. All methods on this class must be inherited by subclasses, and the methods that return multiple objects must support pagination.
Instance Method Summary collapse
-
#applications ⇒ Object
A list of all the applications that have seen exceptions.
-
#empty? ⇒ Boolean
Have any exceptions been logged? If not, return
true
. -
#find(id) ⇒ Object
Find an exception report with the given id.
-
#group(digest) ⇒ Object
Returns the ExceptionGroup matching
digest
. -
#machines ⇒ Object
A list of all the machines that have seen exceptions.
-
#recent ⇒ Object
Return the most recent exception groups.
-
#reports_in_group(digest) ⇒ Object
Returns a list of exceptions whose digest is
digest
. -
#search(params) ⇒ Object
Searches for exception reports maching
params
. -
#store(exception_report) ⇒ Object
Store this
exception_report
, however the store wishes to. -
#supports_extended_searches? ⇒ Boolean
Does this store support searching through the data blob?.
-
#total ⇒ Object
Returns the total number of exceptions.
-
#total_since(timestamp) ⇒ Object
Returns the total number of exceptions since
timestamp
.
Instance Method Details
#applications ⇒ Object
A list of all the applications that have seen exceptions
42 43 44 |
# File 'lib/error_stalker/store/base.rb', line 42 def applications raise NotImplementedError, "Must be implemented by child class" end |
#empty? ⇒ Boolean
Have any exceptions been logged? If not, return true
22 23 24 |
# File 'lib/error_stalker/store/base.rb', line 22 def empty? raise NotImplementedError, "Must be implemented by child class" end |
#find(id) ⇒ Object
Find an exception report with the given id
27 28 29 |
# File 'lib/error_stalker/store/base.rb', line 27 def find(id) raise NotImplementedError, "Must be implemented by child class" end |
#group(digest) ⇒ Object
Returns the ExceptionGroup matching digest
32 33 34 |
# File 'lib/error_stalker/store/base.rb', line 32 def group(digest) raise NotImplementedError, "Must be implemented by child class" end |
#machines ⇒ Object
A list of all the machines that have seen exceptions
47 48 49 |
# File 'lib/error_stalker/store/base.rb', line 47 def machines raise NotImplementedError, "Must be implemented by child class" end |
#recent ⇒ Object
Return the most recent exception groups. Should return an array of ErrorStalker::ExceptionGroup objects.
17 18 19 |
# File 'lib/error_stalker/store/base.rb', line 17 def recent raise NotImplementedError, "Must be implemented by child class" end |
#reports_in_group(digest) ⇒ Object
Returns a list of exceptions whose digest is digest
.
37 38 39 |
# File 'lib/error_stalker/store/base.rb', line 37 def reports_in_group(digest) raise NotImplementedError, "Must be implemented by child class" end |
#search(params) ⇒ Object
Searches for exception reports maching params
. Search should support searching by application name, machine name, exception name, and exception type. The keys in params
should match attributes of ErrorStalker::ExceptionReport, and the results should be ordered by timestamp from newest to oldest.
71 72 73 |
# File 'lib/error_stalker/store/base.rb', line 71 def search(params) raise NotImplementedError, "Must be implemented by child class" end |
#store(exception_report) ⇒ Object
Store this exception_report
, however the store wishes to.
11 12 13 |
# File 'lib/error_stalker/store/base.rb', line 11 def store(exception_report) raise NotImplementedError, "Must be implemented by child class" end |
#supports_extended_searches? ⇒ Boolean
Does this store support searching through the data blob?
52 53 54 |
# File 'lib/error_stalker/store/base.rb', line 52 def supports_extended_searches? false end |
#total ⇒ Object
Returns the total number of exceptions
57 58 59 |
# File 'lib/error_stalker/store/base.rb', line 57 def total raise NotImplementedError, "Must be implemented by child class" end |
#total_since(timestamp) ⇒ Object
Returns the total number of exceptions since timestamp
62 63 64 |
# File 'lib/error_stalker/store/base.rb', line 62 def total_since() raise NotImplementedError, "Must be implemented by child class" end |