Class: ActiveRecord::Turntable::Algorithm::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Turntable::Algorithm::Base
show all
- Defined in:
- lib/active_record/turntable/algorithm/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(config = {}) ⇒ Base
Returns a new instance of Base.
3
4
5
|
# File 'lib/active_record/turntable/algorithm/base.rb', line 3
def initialize(config = {})
@config = config
end
|
Instance Method Details
#choose(shard_maps, key) ⇒ Object
7
8
9
|
# File 'lib/active_record/turntable/algorithm/base.rb', line 7
def choose(shard_maps, key)
raise NotImplementedError, "not implemented"
end
|
#shard_weights(shard_maps, current_sequence_value) ⇒ Object
11
12
13
|
# File 'lib/active_record/turntable/algorithm/base.rb', line 11
def shard_weights(shard_maps, current_sequence_value)
raise NotImplementedError, "not implemented"
end
|