Sha256: e613b09baa143d6f553ed7406587765271940fe5c8f82bf881dfdfac8b7f1d52
Contents?: true
Size: 812 Bytes
Versions: 21
Compression:
Stored size: 812 Bytes
Contents
module CassandraObject module Consistency VALID_READ_CONSISTENCY_LEVELS = [:one, :quorum, :all] VALID_WRITE_CONSISTENCY_LEVELS = VALID_READ_CONSISTENCY_LEVELS def valid_read_consistency_level?(level) !!VALID_READ_CONSISTENCY_LEVELS.include?(level) end def valid_write_consistency_level?(level) !!VALID_WRITE_CONSISTENCY_LEVELS.include?(level) end def write_consistency_for_thrift consistency_for_thrift(write_consistency) end def read_consistency_for_thrift consistency_for_thrift(read_consistency) end def consistency_for_thrift(consistency) { :one => Cassandra::Consistency::ONE, :quorum => Cassandra::Consistency::QUORUM, :all => Cassandra::Consistency::ALL }[consistency] end end end
Version data entries
21 entries across 21 versions & 1 rubygems