aerospike 2.11.0 → 2.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -1
  3. data/README.md +1 -1
  4. data/lib/aerospike.rb +17 -4
  5. data/lib/aerospike/aerospike_exception.rb +7 -1
  6. data/lib/aerospike/atomic/atomic.rb +1 -1
  7. data/lib/aerospike/bin.rb +1 -1
  8. data/lib/aerospike/cdt/bit_operation.rb +376 -0
  9. data/lib/aerospike/cdt/bit_overflow_action.rb +46 -0
  10. data/lib/aerospike/cdt/bit_policy.rb +36 -0
  11. data/lib/aerospike/cdt/bit_resize_flags.rb +44 -0
  12. data/lib/aerospike/cdt/bit_write_flags.rb +51 -0
  13. data/lib/aerospike/cdt/context.rb +101 -0
  14. data/lib/aerospike/cdt/hll_operation.rb +200 -0
  15. data/lib/aerospike/cdt/hll_policy.rb +34 -0
  16. data/lib/aerospike/cdt/hll_write_flags.rb +53 -0
  17. data/lib/aerospike/cdt/list_operation.rb +127 -97
  18. data/lib/aerospike/cdt/list_sort_flags.rb +10 -2
  19. data/lib/aerospike/cdt/map_operation.rb +154 -93
  20. data/lib/aerospike/cdt/map_order.rb +1 -1
  21. data/lib/aerospike/cdt/map_policy.rb +1 -1
  22. data/lib/aerospike/cdt/map_return_type.rb +1 -1
  23. data/lib/aerospike/cdt/map_write_mode.rb +1 -1
  24. data/lib/aerospike/client.rb +33 -17
  25. data/lib/aerospike/cluster.rb +139 -17
  26. data/lib/aerospike/cluster/partition.rb +1 -1
  27. data/lib/aerospike/cluster/partition_parser.rb +169 -0
  28. data/lib/aerospike/cluster/rack_parser.rb +117 -0
  29. data/lib/aerospike/command/admin_command.rb +1 -1
  30. data/lib/aerospike/command/batch_direct_command.rb +2 -1
  31. data/lib/aerospike/command/batch_direct_exists_command.rb +1 -1
  32. data/lib/aerospike/command/batch_direct_node.rb +3 -3
  33. data/lib/aerospike/command/batch_index_command.rb +11 -2
  34. data/lib/aerospike/command/batch_index_node.rb +2 -2
  35. data/lib/aerospike/command/batch_item.rb +1 -1
  36. data/lib/aerospike/command/command.rb +168 -12
  37. data/lib/aerospike/command/delete_command.rb +21 -5
  38. data/lib/aerospike/command/execute_command.rb +1 -1
  39. data/lib/aerospike/command/exists_command.rb +21 -5
  40. data/lib/aerospike/command/field_type.rb +2 -1
  41. data/lib/aerospike/command/multi_command.rb +55 -5
  42. data/lib/aerospike/command/operate_command.rb +6 -1
  43. data/lib/aerospike/command/read_command.rb +63 -20
  44. data/lib/aerospike/command/read_header_command.rb +18 -6
  45. data/lib/aerospike/command/roles.rb +1 -1
  46. data/lib/aerospike/command/single_command.rb +9 -3
  47. data/lib/aerospike/command/touch_command.rb +48 -4
  48. data/lib/aerospike/command/unsupported_particle_type_validator.rb +1 -1
  49. data/lib/aerospike/command/write_command.rb +13 -4
  50. data/lib/aerospike/connection/create.rb +1 -1
  51. data/lib/aerospike/features.rb +6 -1
  52. data/lib/aerospike/geo_json.rb +1 -1
  53. data/lib/aerospike/host.rb +1 -1
  54. data/lib/aerospike/info.rb +1 -1
  55. data/lib/aerospike/key.rb +1 -1
  56. data/lib/aerospike/language.rb +1 -1
  57. data/lib/aerospike/node.rb +21 -7
  58. data/lib/aerospike/node/rebalance.rb +50 -0
  59. data/lib/aerospike/node/refresh/info.rb +4 -1
  60. data/lib/aerospike/node/refresh/partitions.rb +6 -15
  61. data/lib/aerospike/node/refresh/racks.rb +47 -0
  62. data/lib/aerospike/node/refresh/reset.rb +1 -0
  63. data/lib/aerospike/node/verify/rebalance_generation.rb +43 -0
  64. data/lib/aerospike/node_validator.rb +4 -19
  65. data/lib/aerospike/operation.rb +13 -3
  66. data/lib/aerospike/policy/admin_policy.rb +1 -1
  67. data/lib/aerospike/policy/batch_policy.rb +1 -1
  68. data/lib/aerospike/policy/client_policy.rb +16 -1
  69. data/lib/aerospike/policy/commit_level.rb +1 -1
  70. data/lib/aerospike/policy/consistency_level.rb +1 -1
  71. data/lib/aerospike/policy/generation_policy.rb +1 -1
  72. data/lib/aerospike/policy/operate_policy.rb +1 -1
  73. data/lib/aerospike/policy/policy.rb +64 -2
  74. data/lib/aerospike/policy/priority.rb +1 -1
  75. data/lib/aerospike/policy/query_policy.rb +8 -1
  76. data/lib/aerospike/policy/record_bin_multiplicity.rb +1 -1
  77. data/lib/aerospike/policy/record_exists_action.rb +1 -1
  78. data/lib/aerospike/policy/replica.rb +45 -0
  79. data/lib/aerospike/policy/scan_policy.rb +8 -1
  80. data/lib/aerospike/policy/write_policy.rb +1 -1
  81. data/lib/aerospike/query/filter.rb +1 -1
  82. data/lib/aerospike/query/query_command.rb +16 -5
  83. data/lib/aerospike/query/recordset.rb +1 -1
  84. data/lib/aerospike/query/scan_command.rb +1 -1
  85. data/lib/aerospike/query/statement.rb +9 -2
  86. data/lib/aerospike/query/stream_command.rb +1 -1
  87. data/lib/aerospike/record.rb +1 -1
  88. data/lib/aerospike/result_code.rb +26 -7
  89. data/lib/aerospike/socket/base.rb +4 -3
  90. data/lib/aerospike/task/execute_task.rb +1 -1
  91. data/lib/aerospike/task/index_task.rb +1 -1
  92. data/lib/aerospike/task/task.rb +1 -1
  93. data/lib/aerospike/task/udf_register_task.rb +1 -1
  94. data/lib/aerospike/task/udf_remove_task.rb +1 -1
  95. data/lib/aerospike/ttl.rb +1 -1
  96. data/lib/aerospike/udf.rb +1 -1
  97. data/lib/aerospike/user_role.rb +1 -1
  98. data/lib/aerospike/utils/buffer.rb +14 -4
  99. data/lib/aerospike/utils/packer.rb +1 -1
  100. data/lib/aerospike/utils/pool.rb +1 -1
  101. data/lib/aerospike/utils/unpacker.rb +1 -1
  102. data/lib/aerospike/value/particle_type.rb +2 -2
  103. data/lib/aerospike/value/value.rb +165 -33
  104. data/lib/aerospike/version.rb +1 -1
  105. metadata +20 -8
  106. data/lib/aerospike/cluster/partition_tokenizer_new.rb +0 -130
  107. data/lib/aerospike/cluster/partition_tokenizer_old.rb +0 -135
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Aerospike, Inc.
4
+ #
5
+ # Portions may be licensed to Aerospike, Inc. under one or more contributor
6
+ # license agreements.
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ # use this file except in compliance with the License. You may obtain a copy of
10
+ # the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ # License for the specific language governing permissions and limitations under
18
+ # the License.
19
+
20
+ module Aerospike
21
+ module CDT
22
+
23
+ # BitOverflowAction specifies the action to take when bitwise add/subtract results in overflow/underflow.
24
+ module BitOverflowAction
25
+
26
+ ##
27
+ # Fail specifies to fail operation with error.
28
+ FAIL = 0
29
+
30
+ ##
31
+ # SATURATE specifies that in add/subtract overflows/underflows, set to max/min value.
32
+ # Example: MAXINT + 1 = MAXINT
33
+ SATURATE = 2
34
+
35
+ ##
36
+ # Wrap specifies that in add/subtract overflows/underflows, WRAP the value.
37
+ # Example: MAXINT + 1 = -1
38
+ WRAP = 4
39
+
40
+ ##
41
+ # Default behavior
42
+ DEFAULT = FAIL
43
+
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Aerospike, Inc.
4
+ #
5
+ # Portions may be licensed to Aerospike, Inc. under one or more contributor
6
+ # license agreements.
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ # use this file except in compliance with the License. You may obtain a copy of
10
+ # the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ # License for the specific language governing permissions and limitations under
18
+ # the License.
19
+
20
+ module Aerospike
21
+ module CDT
22
+
23
+ # BitPolicy determines the Bit operation policy.
24
+ class BitPolicy
25
+
26
+ attr_accessor :flags
27
+
28
+ def initialize(flags = BitWriteFlags::DEFAULT)
29
+ @flags = flags
30
+ end
31
+
32
+ DEFAULT = BitPolicy.new
33
+
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Aerospike, Inc.
4
+ #
5
+ # Portions may be licensed to Aerospike, Inc. under one or more contributor
6
+ # license agreements.
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ # use this file except in compliance with the License. You may obtain a copy of
10
+ # the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ # License for the specific language governing permissions and limitations under
18
+ # the License.
19
+
20
+ module Aerospike
21
+ module CDT
22
+
23
+ ##
24
+ # BitResizeFlags specifies the bitwise operation flags for resize.
25
+ module BitResizeFlags
26
+
27
+ ##
28
+ # Default specifies the defalt flag.
29
+ DEFAULT = 0
30
+
31
+ ##
32
+ # Adds/removes bytes from the beginning instead of the end.
33
+ FROM_FRONT = 1
34
+
35
+ ##
36
+ # only allow the byte array size to increase.
37
+ GROW_ONLY = 2
38
+
39
+ ##
40
+ # only allow the byte array size to decrease.
41
+ SHRINK_ONLY = 4
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Aerospike, Inc.
4
+ #
5
+ # Portions may be licensed to Aerospike, Inc. under one or more contributor
6
+ # license agreements.
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ # use this file except in compliance with the License. You may obtain a copy of
10
+ # the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ # License for the specific language governing permissions and limitations under
18
+ # the License.
19
+
20
+ module Aerospike
21
+ module CDT
22
+
23
+ ##
24
+ # BitWriteFlags specify bitwise operation policy write flags.
25
+ module BitWriteFlags
26
+
27
+ ##
28
+ # Default allows create or update.
29
+ DEFAULT = 0
30
+
31
+ ##
32
+ # If the bin already exists, the operation will be denied.
33
+ # If the bin does not exist, a new bin will be created.
34
+ CREATE_ONLY = 1
35
+
36
+ ##
37
+ # If the bin already exists, the bin will be overwritten.
38
+ # If the bin does not exist, the operation will be denied.
39
+ UPDATE_ONLY = 2
40
+
41
+ ##
42
+ # Will not raise error if operation is denied.
43
+ NO_FAIL = 4
44
+
45
+ ##
46
+ # Partial allows other valid operations to be committed if this operations is
47
+ # denied due to flag constraints.
48
+ PARTIAL = 8
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,101 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Aerospike, Inc.
4
+ #
5
+ # Portions may be licensed to Aerospike, Inc. under one or more contributor
6
+ # license agreements.
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ # use this file except in compliance with the License. You may obtain a copy of
10
+ # the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ # License for the specific language governing permissions and limitations under
18
+ # the License.
19
+
20
+ module Aerospike
21
+ module CDT
22
+
23
+ ##
24
+ # Nested CDT context. Identifies the location of nested list/map to apply the operation.
25
+ # for the current level.
26
+ # An array of CTX identifies location of the list/map on multiple
27
+ # levels on nesting.
28
+ class Context
29
+
30
+ attr_accessor :id, :value
31
+
32
+ def initialize(id, value)
33
+ @id = id
34
+ @value = value
35
+ end
36
+
37
+ ##
38
+ # Lookup list by index offset.
39
+ # If the index is negative, the resolved index starts backwards from end of list.
40
+ # If an index is out of bounds, a parameter error will be returned.
41
+ # Examples:
42
+ # 0: First item.
43
+ # 4: Fifth item.
44
+ # -1: Last item.
45
+ # -3: Third to last item.
46
+ def self.list_index(index)
47
+ Context.new(0x10, index)
48
+ end
49
+
50
+ ##
51
+ # Lookup list by rank.
52
+ # 0 = smallest value
53
+ # N = Nth smallest value
54
+ # -1 = largest value
55
+ def self.list_rank(rank)
56
+ Context.new(0x11, rank)
57
+ end
58
+
59
+ ##
60
+ # Lookup list by value.
61
+ def self.list_value(key)
62
+ Context.new(0x13, key)
63
+ end
64
+
65
+ ##
66
+ # Lookup map by index offset.
67
+ # If the index is negative, the resolved index starts backwards from end of list.
68
+ # If an index is out of bounds, a parameter error will be returned.
69
+ # Examples:
70
+ # 0: First item.
71
+ # 4: Fifth item.
72
+ # -1: Last item.
73
+ # -3: Third to last item.
74
+ def self.map_index(index)
75
+ Context.new(0x20, index)
76
+ end
77
+
78
+ ##
79
+ # Lookup map by rank.
80
+ # 0 = smallest value
81
+ # N = Nth smallest value
82
+ # -1 = largest value
83
+ def self.map_rank(rank)
84
+ Context.new(0x21, rank)
85
+ end
86
+
87
+ ##
88
+ # Lookup map by key.
89
+ def self.map_key(key)
90
+ Context.new(0x22, key)
91
+ end
92
+
93
+ ##
94
+ # Lookup map by value.
95
+ def self.map_value(key)
96
+ Context.new(0x23, key)
97
+ end
98
+
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,200 @@
1
+ # encoding: utf-8
2
+ # Copyright 2016-2020 Aerospike, Inc.
3
+ #
4
+ # Portions may be licensed to Aerospike, Inc. under one or more contributor
5
+ # license agreements.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
8
+ # use this file except in compliance with the License. You may obtain a copy of
9
+ # the License at http:#www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ # License for the specific language governing permissions and limitations under
15
+ # the License.
16
+
17
+ module Aerospike
18
+ module CDT
19
+
20
+ # HyperLogLog (HLL) operations.
21
+ # Requires server versions >= 4.9.
22
+ #
23
+ # HyperLogLog operations on HLL items nested in lists/maps are not currently
24
+ # supported by the server.
25
+ class HLLOperation < Operation
26
+
27
+ INIT = 0
28
+ ADD = 1
29
+ SET_UNION = 2
30
+ SET_COUNT = 3
31
+ FOLD = 4
32
+ COUNT = 50
33
+ UNION = 51
34
+ UNION_COUNT = 52
35
+ INTERSECT_COUNT = 53
36
+ SIMILARITY = 54
37
+ DESCRIBE = 55
38
+
39
+ attr_reader :hll_op, :values, :return_type, :policy, :index_bit_count, :minhash_bit_count
40
+
41
+ def initialize(op_type, hll_op, bin_name, values: nil, index_bit_count: nil, minhash_bit_count: nil, policy: nil)
42
+ @policy = policy
43
+ @op_type = op_type
44
+ @bin_name = bin_name
45
+ @bin_value = nil
46
+ @hll_op = hll_op
47
+ @index_bit_count = index_bit_count
48
+ @minhash_bit_count = minhash_bit_count
49
+ @values = values
50
+
51
+ self
52
+ end
53
+
54
+ ##
55
+ # Create HLL init operation with minhash bits.
56
+ # Server creates a new HLL or resets an existing HLL.
57
+ # Server does not return a value.
58
+ #
59
+ # policy write policy, HLLPolicy::DEFAULT is default
60
+ # bin_name name of bin
61
+ # index_bit_count number of index bits. Must be between 4 and 16 inclusive.
62
+ # minhash_bit_count number of min hash bits. Must be between 4 and 58 inclusive.
63
+ def self.init(bin_name, index_bit_count, minhash_bit_count, policy = HLLPolicy::DEFAULT)
64
+ HLLOperation.new(Operation::HLL_MODIFY, INIT, bin_name, index_bit_count: index_bit_count, minhash_bit_count: minhash_bit_count, policy: policy)
65
+ end
66
+
67
+ ##
68
+ # Create HLL add operation with minhash bits.
69
+ # Server adds values to HLL set. If HLL bin does not exist, use index_bit_count and minhash_bit_count
70
+ # to create HLL bin. Server returns number of entries that caused HLL to update a register.
71
+ #
72
+ # policy write policy, HLLPolicy::DEFAULT is default
73
+ # bin_name name of bin
74
+ # list list of values to be added
75
+ # index_bit_count number of index bits. Must be between 4 and 16 inclusive.
76
+ # minhash_bit_count number of min hash bits. Must be between 4 and 58 inclusive.
77
+ def self.add(bin_name, *values, policy: HLLPolicy::DEFAULT, index_bit_count: -1, minhash_bit_count: -1)
78
+ HLLOperation.new(Operation::HLL_MODIFY, ADD, bin_name, index_bit_count: index_bit_count, minhash_bit_count: minhash_bit_count, values: values, policy: policy)
79
+ end
80
+
81
+ ##
82
+ # Create HLL set union operation.
83
+ # Server sets union of specified HLL objects with HLL bin.
84
+ # Server does not return a value.
85
+ #
86
+ # policy write policy, HLLPolicy::DEFAULT is default
87
+ # bin_name name of bin
88
+ # list list of HLL objects
89
+ def self.set_union(bin_name, *values, policy: HLLPolicy::DEFAULT)
90
+ HLLOperation.new(Operation::HLL_MODIFY, SET_UNION, bin_name, values: values, policy: policy)
91
+ end
92
+
93
+ ##
94
+ # Create HLL refresh operation.
95
+ # Server updates the cached count (if stale) and returns the count.
96
+ #
97
+ # bin_name name of bin
98
+ def self.refresh_count(bin_name)
99
+ HLLOperation.new(Operation::HLL_MODIFY, SET_COUNT, bin_name)
100
+ end
101
+
102
+ ##
103
+ # Create HLL fold operation.
104
+ # Servers folds index_bit_count to the specified value.
105
+ # This can only be applied when minhash_bit_count on the HLL bin is 0.
106
+ # Server does not return a value.
107
+ #
108
+ # bin_name name of bin
109
+ # index_bit_count number of index bits. Must be between 4 and 16 inclusive.
110
+ def self.fold(bin_name, index_bit_count)
111
+ HLLOperation.new(Operation::HLL_MODIFY, FOLD, bin_name, index_bit_count: index_bit_count)
112
+ end
113
+
114
+ ##
115
+ # Create HLL getCount operation.
116
+ # Server returns estimated number of elements in the HLL bin.
117
+ #
118
+ # bin_name name of bin
119
+ def self.get_count(bin_name)
120
+ HLLOperation.new(Operation::HLL_READ, COUNT, bin_name)
121
+ end
122
+
123
+ ##
124
+ # Create HLL getUnion operation.
125
+ # Server returns an HLL object that is the union of all specified HLL objects in the list
126
+ # with the HLL bin.
127
+ #
128
+ # bin_name name of bin
129
+ # list list of HLL objects
130
+ def self.get_union(bin_name, *values)
131
+ HLLOperation.new(Operation::HLL_READ, UNION, bin_name, values: values)
132
+ end
133
+
134
+ ##
135
+ # Create HLL getUnionCount operation.
136
+ # Server returns estimated number of elements that would be contained by the union of these
137
+ # HLL objects.
138
+ # bin_name name of bin
139
+ # list list of HLL objects
140
+ def self.get_union_count(bin_name, *values)
141
+ HLLOperation.new(Operation::HLL_READ, UNION_COUNT, bin_name, values: values)
142
+ end
143
+
144
+ ##
145
+ # Create HLL getIntersectCount operation.
146
+ # Server returns estimated number of elements that would be contained by the intersection of
147
+ # these HLL objects.
148
+ #
149
+ # bin_name name of bin
150
+ # list list of HLL objects
151
+ def self.get_intersect_count(bin_name, *values)
152
+ HLLOperation.new(Operation::HLL_READ, INTERSECT_COUNT, bin_name, values: values)
153
+ end
154
+
155
+ ##
156
+ # Create HLL getSimilarity operation.
157
+ # Server returns estimated similarity of these HLL objects. Return type is a double.
158
+ #
159
+ # bin_name name of bin
160
+ # list list of HLL objects
161
+ def self.get_similarity(bin_name, *values)
162
+ HLLOperation.new(Operation::HLL_READ, SIMILARITY, bin_name, values: values)
163
+ end
164
+
165
+ ##
166
+ # Create HLL describe operation.
167
+ # Server returns index_bit_count and minhash_bit_count used to create HLL bin in a list of longs.
168
+ # The list size is 2.
169
+ #
170
+ # bin_name name of bin
171
+ def self.describe(bin_name)
172
+ HLLOperation.new(Operation::HLL_READ, DESCRIBE, bin_name)
173
+ end
174
+
175
+ def bin_value
176
+ @bin_value ||= pack_bin_value
177
+ end
178
+
179
+ private
180
+
181
+ def pack_bin_value
182
+ bytes = nil
183
+ Packer.use do |packer|
184
+ args = [hll_op]
185
+ args << values if values
186
+ args << index_bit_count if index_bit_count
187
+ args << minhash_bit_count if minhash_bit_count
188
+ args << policy.flags if policy
189
+
190
+ vv = ListValue.new(args)
191
+ vv.pack(packer)
192
+ bytes = packer.bytes
193
+ end
194
+ BytesValue.new(bytes)
195
+ end
196
+
197
+ end
198
+
199
+ end
200
+ end