Module: ZeevexCluster::Strategy
- Defined in:
- lib/zeevex_cluster/strategy/base.rb,
lib/zeevex_cluster/strategy.rb,
lib/zeevex_cluster/strategy/static.rb,
lib/zeevex_cluster/strategy/zookeeper.rb,
lib/zeevex_cluster/strategy/unclustered.rb
Overview
require ‘zeevex_threadsafe/thread_safer’
Defined Under Namespace
Classes: Base, Cas, Static, Unclustered, Zookeeper
Class Method Summary collapse
Class Method Details
.create(ctype, options) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/zeevex_cluster/strategy.rb', line 3 def self.create(ctype, ) require 'zeevex_cluster/strategy/' + ctype.downcase clazz = self.const_get(ctype.capitalize) raise ArgumentError, "Unknown strategy type: #{ctype}" unless clazz ZeevexCluster.Synchronized(clazz.new()) end |