Class: Gemfire::Statistic
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- Gemfire::Statistic
- Defined in:
- lib/vas/gemfire/statistics.rb
Overview
A statistic of a cache server
Instance Attribute Summary collapse
-
#instance ⇒ Object
readonly
The statistic’s cache server node instance.
-
#last_modified ⇒ Object
readonly
The last modified time of the disk store.
-
#path ⇒ Object
readonly
The path of statistic.
-
#size ⇒ Object
readonly
The size of the statistic.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#content(&block) ⇒ Object
Retrieves the statistic’s content and passes it to the
block
. -
#initialize(location, client) ⇒ Statistic
constructor
A new instance of Statistic.
- #to_s ⇒ Object
Constructor Details
#initialize(location, client) ⇒ Statistic
Returns a new instance of Statistic.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/vas/gemfire/statistics.rb', line 44 def initialize(location, client) super(location, client) @last_modified = details['last-modified'] @path = details['path'] @size = details['size'] @instance = CacheServerNodeInstance.new(Util::LinkUtils.get_link_href(details, 'cache-server-node-instance'), client) @content_location = Util::LinkUtils.get_link_href(details, 'content') end |
Instance Attribute Details
#instance ⇒ Object (readonly)
The statistic’s cache server node instance
42 43 44 |
# File 'lib/vas/gemfire/statistics.rb', line 42 def instance @instance end |
#last_modified ⇒ Object (readonly)
The last modified time of the disk store
33 34 35 |
# File 'lib/vas/gemfire/statistics.rb', line 33 def last_modified @last_modified end |
#path ⇒ Object (readonly)
The path of statistic
36 37 38 |
# File 'lib/vas/gemfire/statistics.rb', line 36 def path @path end |
#size ⇒ Object (readonly)
The size of the statistic
39 40 41 |
# File 'lib/vas/gemfire/statistics.rb', line 39 def size @size end |
Instance Method Details
#content(&block) ⇒ Object
Retrieves the statistic’s content and passes it to the block
56 57 58 |
# File 'lib/vas/gemfire/statistics.rb', line 56 def content(&block) client.get_stream(@content_location, &block) end |
#to_s ⇒ Object
60 61 62 |
# File 'lib/vas/gemfire/statistics.rb', line 60 def to_s "#<#{self.class} path='#@path'>" end |