Class: PartitionGardener::Plan::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/partition_gardener/plan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hot_bucketsObject (readonly)

Returns the value of attribute hot_buckets

Returns:

  • (Object)

    the current value of hot_buckets



37
38
39
# File 'lib/partition_gardener/plan.rb', line 37

def hot_buckets
  @hot_buckets
end

#segmentsObject (readonly)

Returns the value of attribute segments

Returns:

  • (Object)

    the current value of segments



37
38
39
# File 'lib/partition_gardener/plan.rb', line 37

def segments
  @segments
end

Instance Method Details

#changed?(attached_segments) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
45
46
# File 'lib/partition_gardener/plan.rb', line 42

def changed?(attached_segments)
  attached_signatures = attached_segments.map(&:signature).sort
  target_signatures = segments.map(&:signature).sort
  attached_signatures != target_signatures
end

#hot_monthsObject



38
39
40
# File 'lib/partition_gardener/plan.rb', line 38

def hot_months
  hot_buckets
end