Sha256: 4622811895307cbd523fd636fe2463f340613772bc7af4855078294956999cbe

Contents?: true

Size: 338 Bytes

Versions: 6

Compression:

Stored size: 338 Bytes

Contents

module ActiveRecord::Turntable::Algorithm
  class Base
    def initialize(config = {})
      @config = config
    end

    def choose(shard_maps, key)
      raise NotImplementedError, "not implemented"
    end

    def shard_weights(shard_maps, current_sequence_value)
      raise NotImplementedError, "not implemented"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activerecord-turntable-4.4.1 lib/active_record/turntable/algorithm/base.rb
activerecord-turntable-4.4.0 lib/active_record/turntable/algorithm/base.rb
activerecord-turntable-4.3.0 lib/active_record/turntable/algorithm/base.rb
activerecord-turntable-4.2.0 lib/active_record/turntable/algorithm/base.rb
activerecord-turntable-4.1.0 lib/active_record/turntable/algorithm/base.rb
activerecord-turntable-4.0.0 lib/active_record/turntable/algorithm/base.rb