Class: PartitionGardener::Plan::Segment
- Inherits:
-
Data
- Object
- Data
- PartitionGardener::Plan::Segment
- Defined in:
- lib/partition_gardener/plan.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#range_end ⇒ Object
readonly
Returns the value of attribute range_end.
-
#range_start ⇒ Object
readonly
Returns the value of attribute range_start.
Instance Method Summary collapse
- #archive? ⇒ Boolean
- #filler? ⇒ Boolean
- #for_values_clause(strategy) ⇒ Object
- #future? ⇒ Boolean
- #hash_partition? ⇒ Boolean
- #hot_bucket? ⇒ Boolean
- #monthly? ⇒ Boolean
- #signature ⇒ Object
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind
3 4 5 |
# File 'lib/partition_gardener/plan.rb', line 3 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name
3 4 5 |
# File 'lib/partition_gardener/plan.rb', line 3 def name @name end |
#range_end ⇒ Object (readonly)
Returns the value of attribute range_end
3 4 5 |
# File 'lib/partition_gardener/plan.rb', line 3 def range_end @range_end end |
#range_start ⇒ Object (readonly)
Returns the value of attribute range_start
3 4 5 |
# File 'lib/partition_gardener/plan.rb', line 3 def range_start @range_start end |
Instance Method Details
#archive? ⇒ Boolean
20 21 22 |
# File 'lib/partition_gardener/plan.rb', line 20 def archive? kind == :archive end |
#filler? ⇒ Boolean
12 13 14 |
# File 'lib/partition_gardener/plan.rb', line 12 def filler? kind == :filler end |
#for_values_clause(strategy) ⇒ Object
28 29 30 |
# File 'lib/partition_gardener/plan.rb', line 28 def for_values_clause(strategy) strategy.segment_for_values_clause(self) end |
#future? ⇒ Boolean
16 17 18 |
# File 'lib/partition_gardener/plan.rb', line 16 def future? kind == :future end |
#hash_partition? ⇒ Boolean
24 25 26 |
# File 'lib/partition_gardener/plan.rb', line 24 def hash_partition? range_start.is_a?(Hash) && range_start.key?(:modulus) end |
#hot_bucket? ⇒ Boolean
8 9 10 |
# File 'lib/partition_gardener/plan.rb', line 8 def hot_bucket? kind == :hot_bucket end |
#monthly? ⇒ Boolean
4 5 6 |
# File 'lib/partition_gardener/plan.rb', line 4 def monthly? kind == :hot_bucket && !hash_partition? end |
#signature ⇒ Object
32 33 34 |
# File 'lib/partition_gardener/plan.rb', line 32 def signature [name, range_start, range_end, kind] end |