class Cassandra::ColumnContainer::Compaction

Encapsulates the compaction strategy of a column-container.

Attributes

class_name[R]

@return [String] the name of the Cassandra class that performs compaction.

options[R]

@return [Hash] compaction strategy options

Public Class Methods

new(class_name, options) click to toggle source

@private

    # File lib/cassandra/column_container.rb
197 def initialize(class_name, options)
198   @class_name = class_name
199   @options = options
200 end

Public Instance Methods

==(other)
Alias for: eql?
eql?(other) click to toggle source

@private

    # File lib/cassandra/column_container.rb
211 def eql?(other)
212   other.is_a?(Compaction) &&
213     @class_name == other.class_name &&
214     @options == other.options
215 end
Also aliased as: ==
to_cql() click to toggle source

@private

    # File lib/cassandra/column_container.rb
203 def to_cql
204   compaction = {'class' => @class_name}
205   compaction.merge!(@options)
206 
207   Util.encode_hash(compaction)
208 end