class Aerospike::PartitionFilter
Attributes
count[R]
digest[R]
done[RW]
done?[RW]
partition_begin[R]
partitions[RW]
Public Class Methods
all()
click to toggle source
Creates a partition filter that reads all the partitions.
# File lib/aerospike/query/partition_filter.rb, line 27 def self.all PartitionFilter.new(0, Aerospike::Node::PARTITIONS) end
by_id(partition_id)
click to toggle source
Creates a partition filter by partition id. Partition
id is between 0 - 4095
# File lib/aerospike/query/partition_filter.rb, line 33 def self.by_id(partition_id) PartitionFilter.new(partition_id, 1) end
by_key(key)
click to toggle source
Creates a partition filter that will return records after key’s digest in the partition containing the digest. Note that digest order is not the same as userKey order. This method only works for scan or query with nil filter.
# File lib/aerospike/query/partition_filter.rb, line 48 def self.by_key(key) PartitionFilter.new(key.partition_id, 1, key.digest) end
by_range(partition_begin, count)
click to toggle source
Creates a partition filter by partition range. begin partition id is between 0 - 4095 count is the number of partitions, in the range of 1 - 4096 inclusive.
# File lib/aerospike/query/partition_filter.rb, line 40 def self.by_range(partition_begin, count) PartitionFilter.new(partition_begin, count) end
new(partition_begin, count, digest = nil, partitions = nil, done = false)
click to toggle source
# File lib/aerospike/query/partition_filter.rb, line 58 def initialize(partition_begin, count, digest = nil, partitions = nil, done = false) @partition_begin = partition_begin @count = count @digest = digest @partitions = partitions @done = done end
Public Instance Methods
to_s()
click to toggle source
# File lib/aerospike/query/partition_filter.rb, line 52 def to_s "PartitionFilter<begin: #{@partition_begin}, count: #{@count}, digest: #{@digest}, done: #{@done}>" end