Sha256: 2cfaa72659615d738e3ded38973e3e2fe1adb986f8109fff7df0c7293155182b

Contents?: true

Size: 517 Bytes

Versions: 13

Compression:

Stored size: 517 Bytes

Contents

module RedisFailover
  class NodeStrategy
    # Consensus strategy only marks the node as unavailable if all members of the
    # snapshot indicate that the node is down.
    class Consensus < NodeStrategy
      # @see RedisFailover::NodeStrategy#determine_state
      def determine_state(node, snapshots)
        snapshot = snapshots[node]
        if snapshot.all_unavailable?
          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/consensus.rb
nogara-redis_failover-1.0.6 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-1.0.5 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-1.0.4 lib/redis_failover/node_strategy/consensus.rb
redis_failover-1.0.2 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-1.0.2 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-1.0.1 lib/redis_failover/node_strategy/consensus.rb
redis_failover-1.0.1 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-1.0.0 lib/redis_failover/node_strategy/consensus.rb
redis_failover-1.0.0 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-0.9.7.4 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-0.9.7.3 lib/redis_failover/node_strategy/consensus.rb
nogara-redis_failover-0.9.7.2 lib/redis_failover/node_strategy/consensus.rb