lib/aerospike/client.rb
def batch_get(keys, bin_names = nil, options = nil)
      policy = create_policy(options, BatchPolicy, default_batch_policy)
      results = Array.new(keys.length)
      info_flags = INFO1_READ

      case bin_names
      when :all, nil, []
        info_flags |= INFO1_GET_ALL
        bin_names = nil
      when :none
        info_flags |= INFO1_NOBINDATA
        bin_names = nil
      end

      if policy.use_batch_direct
        key_map = BatchItem.generate_map(keys)
        execute_batch_direct_commands(keys) do |node, batch|
          BatchDirectCommand.new(node, batch, policy, key_map, bin_names, results, info_flags)
        end
      else
        execute_batch_index_commands(keys) do |node, batch|
          BatchIndexCommand.new(node, batch, policy, bin_names, results, info_flags)
        end
      end

      results
    end
#  Read multiple record headers and bins for specified keys in one batch call.
#  The returned records are in positional order with the original key array order.
#  If a key is not found, the positional record will be nil.
#  The policy can be used to specify timeouts and protocol type.
Read multiple record headers and bins for specified keys in one batch call.
The returned records are in positional order with the original key array order.
If a key is not found, the positional record will be nil.
The policy can be used to specify timeouts and protocol type.
Read multiple record headers and bins for specified keys in one batch call . The returned records are in positional order with the original key array order . If a key is not found the positional record will be nil . The policy can be used to specify timeouts and protocol type .
def batch_get(keys, bin_names = nil, options = nil)
      policy = create_policy(options, BatchPolicy, default_batch_policy)
      results = Array.new(keys.length)
      info_flags = INFO1_READ
      case bin_names
      when :all, nil, []
        info_flags |= INFO1_GET_ALL
        bin_names = nil
      when :none
        info_flags |= INFO1_NOBINDATA
        bin_names = nil
      end
      if policy.use_batch_direct
        key_map = BatchItem.generate_map(keys)
        execute_batch_direct_commands(keys) do |node, batch|
          BatchDirectCommand.new(node, batch, policy, key_map, bin_names, results, info_flags)
        end
      else
        execute_batch_index_commands(keys) do |node, batch|
          BatchIndexCommand.new(node, batch, policy, bin_names, results, info_flags)
        end
      end
      results
    end
def batch_get ( keys , bin_names = nil , options = nil ) policy = create_policy ( options , BatchPolicy , default_batch_policy ) results = Array . new ( keys . length ) info_flags = INFO1_READ case bin_names when :all , nil , [ ] info_flags |= INFO1_GET_ALL bin_names = nil when :none info_flags |= INFO1_NOBINDATA bin_names = nil end if policy . use_batch_direct key_map = BatchItem . generate_map ( keys ) execute_batch_direct_commands ( keys ) do | node , batch | BatchDirectCommand . new ( node , batch , policy , key_map , bin_names , results , info_flags ) end else execute_batch_index_commands ( keys ) do | node , batch | BatchIndexCommand . new ( node , batch , policy , bin_names , results , info_flags ) end end results end
Read multiple record headers and bins for specified keys in one batch call.
Read multiple record headers and bins for specified keys in one batch call .
keys
bin_names
options