Sha256: c53224a61c819bfa7fc49862ac043a0f0932852e4981fb726cc61f5d840b40cd

Contents?: true

Size: 472 Bytes

Versions: 13

Compression:

Stored size: 472 Bytes

Contents

module RedisFailover
  class NodeStrategy
    # Marks the node as unavailable if any node manager reports the node as down.
    class Single < NodeStrategy
      # @see RedisFailover::NodeStrategy#determine_state
      def determine_state(node, snapshots)
        snapshot = snapshots[node]
        if snapshot.unavailable_count > 0
          log_unavailable(node, snapshot)
          :unavailable
        else
          :available
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
spbtv_redis_failover-1.0.2.1 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-1.0.6 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-1.0.5 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-1.0.4 lib/redis_failover/node_strategy/single.rb
redis_failover-1.0.2 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-1.0.2 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-1.0.1 lib/redis_failover/node_strategy/single.rb
redis_failover-1.0.1 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-1.0.0 lib/redis_failover/node_strategy/single.rb
redis_failover-1.0.0 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-0.9.7.4 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-0.9.7.3 lib/redis_failover/node_strategy/single.rb
nogara-redis_failover-0.9.7.2 lib/redis_failover/node_strategy/single.rb