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)
-
- (Object) applications
A list of all the applications that have seen exceptions.
-
- (Boolean) empty?
Have any exceptions been logged? If not, return true.
-
- (Object) find(id)
Find an exception report with the given id.
-
- (Object) group(digest)
Returns the ExceptionGroup matching digest.
-
- (Object) machines
A list of all the machines that have seen exceptions.
-
- (Object) recent
Return the most recent exception groups.
-
- (Object) reports_in_group(digest)
Returns a list of exceptions whose digest is digest.
-
- (Object) search(params)
Searches for exception reports maching params.
-
- (Object) store(exception_report)
Store this exception_report, however the store wishes to.
-
- (Boolean) supports_extended_searches?
Does this store support searching through the data blob?.
-
- (Object) total
Returns the total number of exceptions.
-
- (Object) total_since(timestamp)
Returns the total number of exceptions since timestamp.
Instance Method Details
- (Object) applications
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 |
- (Boolean) empty?
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 |
- (Object) find(id)
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 |
- (Object) group(digest)
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 |
- (Object) machines
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 |
- (Object) recent
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 |
- (Object) reports_in_group(digest)
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 |
- (Object) search(params)
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 |
- (Object) store(exception_report)
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 |
- (Boolean) supports_extended_searches?
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 |
- (Object) total
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 |
- (Object) total_since(timestamp)
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 |