Sha256: 4df08bb0e2b2d525a8ea201417ef9d6e195fce113d11e7ef1de30d8659af3a70

Contents?: true

Size: 1.57 KB

Versions: 7

Compression:

Stored size: 1.57 KB

Contents

# Copyright 2014-2018 Aerospike, Inc.
#
# Portions may be licensed to Aerospike, Inc. under one or more contributor
# license agreements.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

require 'aerospike/policy/policy'

module Aerospike

  # Container object for query policy command.
  class QueryPolicy < Policy

    attr_accessor :include_bin_data
    attr_accessor :record_queue_size

    def initialize(opt={})
      super(opt)

      @max_retries = 0

      # Indicates if bin data is retrieved. If false, only record digests (and
      # user keys if stored on the server) are retrieved.
      # Default is true.
      @include_bin_data = opt.fetch(:include_bin_data, true)

      # Number of records to place in queue before blocking. Records received
      # from multiple server nodes will be placed in a queue. A separate thread
      # consumes these records in parallel. If the queue is full, the producer
      # threads will block until records are consumed.
      # Default is 5000.
      @record_queue_size = opt[:record_queue_size] || 5000

      self
    end

  end # class

end # module

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
aerospike-2.12.0 lib/aerospike/policy/query_policy.rb
aerospike-2.11.0 lib/aerospike/policy/query_policy.rb
aerospike-2.10.0 lib/aerospike/policy/query_policy.rb
aerospike-2.9.1 lib/aerospike/policy/query_policy.rb
aerospike-2.9.0 lib/aerospike/policy/query_policy.rb
aerospike-2.8.0 lib/aerospike/policy/query_policy.rb
aerospike-2.7.0 lib/aerospike/policy/query_policy.rb