Class: AWS::SimpleDB::DomainMetadata
- Inherits:
-
Object
- Object
- AWS::SimpleDB::DomainMetadata
- Defined in:
- lib/aws/simple_db/domain_metadata.rb
Overview
SimpleDB can report on the amount of data stored in a domain, the number of items, etc.
Instance Attribute Summary collapse
-
#domain ⇒ Domain
readonly
The domain this metadata is describing.
Instance Method Summary collapse
-
#attribute_name_count ⇒ Integer
The number of unique attribute names in the #domain.
-
#attribute_names_size_bytes ⇒ Integer
The total size of all unique attribute names, in bytes.
-
#attribute_value_count ⇒ Integer
The number of all attribute name/value pairs in the #domain.
-
#attribute_values_size_bytes ⇒ Integer
The total size of all attribute values, in bytes.
- #initialize(domain, options = {}) ⇒ DomainMetadata constructor
-
#item_count ⇒ Integer
The number of all items in the #domain.
-
#item_names_size_bytes ⇒ Integer
The total size of all item names in the #domain, in bytes.
-
#timestamp ⇒ Integer
The data and time when metadata was calculated in Epoch (UNIX) time.
-
#to_h ⇒ Hash
A hash of all of the metadata attributes for this #domain.
Constructor Details
#initialize(domain, options = {}) ⇒ DomainMetadata
55 56 57 58 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 55 def initialize domain, = {} @domain = domain super end |
Instance Attribute Details
#domain ⇒ Domain (readonly)
Returns The domain this metadata is describing.
61 62 63 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 61 def domain @domain end |
Instance Method Details
#attribute_name_count ⇒ Integer
Returns The number of unique attribute names in the #domain.
76 77 78 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 76 def attribute_name_count self.to_h[:attribute_name_count] end |
#attribute_names_size_bytes ⇒ Integer
Returns The total size of all unique attribute names, in bytes.
82 83 84 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 82 def attribute_names_size_bytes self.to_h[:attribute_names_size_bytes] end |
#attribute_value_count ⇒ Integer
Returns The number of all attribute name/value pairs in the #domain.
88 89 90 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 88 def attribute_value_count self.to_h[:attribute_value_count] end |
#attribute_values_size_bytes ⇒ Integer
Returns The total size of all attribute values, in bytes.
93 94 95 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 93 def attribute_values_size_bytes self.to_h[:attribute_values_size_bytes] end |
#item_count ⇒ Integer
Returns The number of all items in the #domain.
64 65 66 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 64 def item_count self.to_h[:item_count] end |
#item_names_size_bytes ⇒ Integer
Returns The total size of all item names in the #domain, in bytes.
70 71 72 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 70 def item_names_size_bytes self.to_h[:item_names_size_bytes] end |
#timestamp ⇒ Integer
Returns The data and time when metadata was calculated in Epoch (UNIX) time.
99 100 101 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 99 def self.to_h[:timestamp] end |
#to_h ⇒ Hash
Returns A hash of all of the metadata attributes for this #domain.
105 106 107 108 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 105 def to_h = client.(:domain_name => domain.name) ATTRIBUTES.inject({}) {|h,attr| h[attr] = .send(attr); h } end |