All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_policy.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2023 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 #pragma once
18 
19 /**
20  * @defgroup client_policies Client Policies
21  *
22  * Policies define the behavior of database operations.
23  *
24  * Policies fall into two groups: policy values and operation policies.
25  * A policy value is a single value which defines how the client behaves. An
26  * operation policy is a group of policy values which affect an operation.
27  *
28  * ## Policy Values
29  *
30  * The following are the policy values. For details, please see the documentation
31  * for each policy value
32  *
33  * - as_policy_key
34  * - as_policy_gen
35  * - as_policy_exists
36  * - as_policy_replica
37  * - as_policy_read_mode_ap
38  * - as_policy_read_mode_sc
39  * - as_policy_commit_level
40  *
41  * ## Operation Policies
42  *
43  * The following are the operation policies. Operation policies are groups of
44  * policy values for a type of operation.
45  *
46  * - as_policy_batch
47  * - as_policy_info
48  * - as_policy_operate
49  * - as_policy_read
50  * - as_policy_remove
51  * - as_policy_query
52  * - as_policy_scan
53  * - as_policy_write
54  */
55 
56 #include <aerospike/as_std.h>
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 /******************************************************************************
63  * MACROS
64  *****************************************************************************/
65 
66 /**
67  * Default socket idle timeout value
68  *
69  * @ingroup client_policies
70  */
71 #define AS_POLICY_SOCKET_TIMEOUT_DEFAULT 30000
72 
73 /**
74  * Default total timeout value
75  *
76  * @ingroup client_policies
77  */
78 #define AS_POLICY_TOTAL_TIMEOUT_DEFAULT 1000
79 
80 /**
81  * Default value for compression threshold
82  *
83  * @ingroup client_policies
84  */
85 #define AS_POLICY_COMPRESSION_THRESHOLD_DEFAULT 0
86 
87 /**
88  * Default as_policy_gen value
89  *
90  * @ingroup client_policies
91  */
92 #define AS_POLICY_GEN_DEFAULT AS_POLICY_GEN_IGNORE
93 
94 /**
95  * Default as_policy_key value
96  *
97  * @ingroup client_policies
98  */
99 #define AS_POLICY_KEY_DEFAULT AS_POLICY_KEY_DIGEST
100 
101 /**
102  * Default as_policy_exists value
103  *
104  * @ingroup client_policies
105  */
106 #define AS_POLICY_EXISTS_DEFAULT AS_POLICY_EXISTS_IGNORE
107 
108 /**
109  * Default as_policy_replica value
110  *
111  * @ingroup client_policies
112  */
113 #define AS_POLICY_REPLICA_DEFAULT AS_POLICY_REPLICA_SEQUENCE
114 
115 /**
116  * Default as_policy_read_mode_ap value
117  *
118  * @ingroup client_policies
119  */
120 #define AS_POLICY_READ_MODE_AP_DEFAULT AS_POLICY_READ_MODE_AP_ONE
121 
122 /**
123  * Default as_policy_read_mode_sc value
124  *
125  * @ingroup client_policies
126  */
127 #define AS_POLICY_READ_MODE_SC_DEFAULT AS_POLICY_READ_MODE_SC_SESSION
128 
129 /**
130  * Default as_policy_commit_level value for write
131  *
132  * @ingroup client_policies
133  */
134 #define AS_POLICY_COMMIT_LEVEL_DEFAULT AS_POLICY_COMMIT_LEVEL_ALL
135 
136 /******************************************************************************
137  * TYPES
138  *****************************************************************************/
139 
140 struct as_exp;
141 
142 /**
143  * Retry Policy
144  *
145  * Specifies the behavior of failed operations.
146  *
147  * @ingroup client_policies
148  */
149 typedef enum as_policy_retry_e {
150 
151  /**
152  * Only attempt an operation once.
153  */
155 
156  /**
157  * If an operation fails, attempt the operation
158  * one more time.
159  */
161 
163 
164 /**
165  * Generation Policy
166  *
167  * Specifies the behavior of record modifications with regard to the
168  * generation value.
169  *
170  * @ingroup client_policies
171  */
172 typedef enum as_policy_gen_e {
173 
174  /**
175  * Do not use record generation to restrict writes.
176  */
178 
179  /**
180  * Update/delete record if expected generation is equal to server generation. Otherwise, fail.
181  */
183 
184  /**
185  * Update/delete record if expected generation greater than the server generation.
186  * Otherwise, fail. This is useful for restore after backup.
187  */
189 
190 } as_policy_gen;
191 
192 /**
193  * Key Policy
194  *
195  * Specifies the behavior for whether keys or digests
196  * should be sent to the cluster.
197  *
198  * @ingroup client_policies
199  */
200 typedef enum as_policy_key_e {
201 
202  /**
203  * Send the digest value of the key.
204  *
205  * This is the recommended mode of operation. This calculates the digest
206  * and send the digest to the server. The digest is only calculated on
207  * the client, and not on the server.
208  */
210 
211  /**
212  * Send the key, in addition to the digest value.
213  *
214  * If you want keys to be returned when scanning or querying, the keys must
215  * be stored on the server. This policy causes a write operation to store
216  * the key. Once a key is stored, the server will keep it - there is no
217  * need to use this policy on subsequent updates of the record.
218  *
219  * If this policy is used on read or delete operations, or on subsequent
220  * updates of a record with a stored key, the key sent will be compared
221  * with the key stored on the server. A mismatch will cause
222  * AEROSPIKE_ERR_RECORD_KEY_MISMATCH to be returned.
223  */
225 
226 } as_policy_key;
227 
228 /**
229  * Existence Policy
230  *
231  * Specifies the behavior for writing the record
232  * depending whether or not it exists.
233  *
234  * @ingroup client_policies
235  */
236 typedef enum as_policy_exists_e {
237 
238  /**
239  * Write the record, regardless of existence. (i.e. create or update.)
240  */
242 
243  /**
244  * Create a record, ONLY if it doesn't exist.
245  */
247 
248  /**
249  * Update a record, ONLY if it exists.
250  */
252 
253  /**
254  * Completely replace a record, ONLY if it exists.
255  */
257 
258  /**
259  * Completely replace a record if it exists, otherwise create it.
260  */
262 
264 
265 /**
266  * Replica Policy
267  *
268  * Defines algorithm used to determine the target node for a command.
269  *
270  * @ingroup client_policies
271  */
272 typedef enum as_policy_replica_e {
273 
274  /**
275  * Use node containing key's master partition.
276  */
278 
279  /**
280  * Distribute reads across nodes containing key's master and replicated partition
281  * in round-robin fashion.
282  */
284 
285  /**
286  * Try node containing master partition first.
287  * If connection fails, all commands try nodes containing replicated partitions.
288  * If socketTimeout is reached, reads also try nodes containing replicated partitions,
289  * but writes remain on master node.
290  */
292 
293  /**
294  * For reads, try node on preferred racks first. If there are no nodes on preferred racks,
295  * use SEQUENCE instead. Also use SEQUENCE for writes.
296  *
297  * as_config.rack_aware, as_config.rack_id or as_config.rack_ids, and server rack
298  * configuration must also be set to enable this functionality.
299  */
301 
303 
304 /**
305  * Read policy for AP (availability) namespaces.
306  *
307  * How duplicates should be consulted in a read operation.
308  * Only makes a difference during migrations and only applicable in AP mode.
309  *
310  * @ingroup client_policies
311  */
312 typedef enum as_policy_read_mode_ap_e {
313 
314  /**
315  * Involve single node in the read operation.
316  */
318 
319  /**
320  * Involve all duplicates in the read operation.
321  */
323 
325 
326 /**
327  * Read policy for SC (strong consistency) namespaces.
328  *
329  * Determines SC read consistency options.
330  *
331  * @ingroup client_policies
332  */
333 typedef enum as_policy_read_mode_sc_e {
334 
335  /**
336  * Ensures this client will only see an increasing sequence of record versions.
337  * Server only reads from master. This is the default.
338  */
340 
341  /**
342  * Ensures ALL clients will only see an increasing sequence of record versions.
343  * Server only reads from master.
344  */
346 
347  /**
348  * Server may read from master or any full (non-migrating) replica.
349  * Increasing sequence of record versions is not guaranteed.
350  */
352 
353  /**
354  * Server may read from master or any full (non-migrating) replica or from unavailable
355  * partitions. Increasing sequence of record versions is not guaranteed.
356  */
358 
360 
361 /**
362  * Commit Level
363  *
364  * Specifies the number of replicas required to be successfully
365  * committed before returning success in a write operation
366  * to provide the desired consistency guarantee.
367  *
368  * @ingroup client_policies
369  */
370 typedef enum as_policy_commit_level_e {
371 
372  /**
373  * Return succcess only after successfully committing all replicas.
374  */
376 
377  /**
378  * Return succcess after successfully committing the master replica.
379  */
381 
383 
384 /**
385  * Generic policy fields shared among all policies.
386  *
387  * @ingroup client_policies
388  */
389 typedef struct as_policy_base_s {
390 
391  /**
392  * Socket idle timeout in milliseconds when processing a database command.
393  *
394  * If socket_timeout is zero and total_timeout is non-zero, then socket_timeout will be set
395  * to total_timeout. If both socket_timeout and total_timeout are non-zero and
396  * socket_timeout > total_timeout, then socket_timeout will be set to total_timeout. If both
397  * socket_timeout and total_timeout are zero, then there will be no socket idle limit.
398  *
399  * If socket_timeout is non-zero and the socket has been idle for at least socket_timeout,
400  * both max_retries and total_timeout are checked. If max_retries and total_timeout are not
401  * exceeded, the transaction is retried.
402  *
403  * Default: 30000ms
404  */
405  uint32_t socket_timeout;
406 
407  /**
408  * Total transaction timeout in milliseconds.
409  *
410  * The total_timeout is tracked on the client and sent to the server along with
411  * the transaction in the wire protocol. The client will most likely timeout
412  * first, but the server also has the capability to timeout the transaction.
413  *
414  * If total_timeout is not zero and total_timeout is reached before the transaction
415  * completes, the transaction will return error AEROSPIKE_ERR_TIMEOUT.
416  * If totalTimeout is zero, there will be no total time limit.
417  *
418  * Default: 1000
419  */
420  uint32_t total_timeout;
421 
422  /**
423  * Maximum number of retries before aborting the current transaction.
424  * The initial attempt is not counted as a retry.
425  *
426  * If max_retries is exceeded, the transaction will return error AEROSPIKE_ERR_TIMEOUT.
427  *
428  * WARNING: Database writes that are not idempotent (such as "add")
429  * should not be retried because the write operation may be performed
430  * multiple times if the client timed out previous transaction attempts.
431  * It's important to use a distinct write policy for non-idempotent
432  * writes which sets max_retries = 0;
433  *
434  * Default for read: 2 (initial attempt + 2 retries = 3 attempts)
435  *
436  * Default for write: 0 (no retries)
437  *
438  * Default for partition scan or query with null filter: 5
439  *
440  * No default for legacy scan/query. No retries are allowed for these commands.
441  */
442  uint32_t max_retries;
443 
444  /**
445  * Milliseconds to sleep between retries. Enter zero to skip sleep.
446  * This field is ignored when max_retries is zero.
447  * This field is also ignored in async mode.
448  *
449  * Reads do not have to sleep when a node goes down because the cluster
450  * does not shut out reads during cluster reformation. The default for
451  * reads is zero.
452  *
453  * The default for writes is also zero because writes are not retried by default.
454  * Writes need to wait for the cluster to reform when a node goes down.
455  * Immediate write retries on node failure have been shown to consistently
456  * result in errors. If max_retries is greater than zero on a write, then
457  * sleep_between_retries should be set high enough to allow the cluster to
458  * reform (>= 3000ms).
459  *
460  * Default: 0 (do not sleep between retries).
461  */
463 
464  /**
465  * Optional expression filter. If filter_exp exists and evaluates to false, the
466  * transaction is ignored. This can be used to eliminate a client/server roundtrip
467  * in some cases.
468  *
469  * aerospike_destroy() automatically calls as_exp_destroy() on all global default
470  * policy filter expression instances. The user is responsible for calling as_exp_destroy()
471  * on filter expressions when setting temporary transaction policies.
472  *
473  * ~~~~~~~~~~{.c}
474  * as_exp_build(filter,
475  * as_exp_cmp_eq(as_exp_bin_int("a"), as_exp_int(10)));
476  *
477  * as_policy_read p;
478  * as_policy_read_init(&p);
479  * p.filter_exp = filter;
480  * ...
481  * as_exp_destroy(filter);
482  * ~~~~~~~~~~
483  *
484  * Default: NULL
485  */
487 
488  /**
489  * Use zlib compression on write or batch read commands when the command buffer size is greater
490  * than 128 bytes. In addition, tell the server to compress it's response on read commands.
491  * The server response compression threshold is also 128 bytes.
492  *
493  * This option will increase cpu and memory usage (for extra compressed buffers), but
494  * decrease the size of data sent over the network.
495  *
496  * Default: false
497  */
498  bool compress;
499 
501 
502 /**
503  * Read Policy
504  *
505  * @ingroup client_policies
506  */
507 typedef struct as_policy_read_s {
508 
509  /**
510  * Generic policy fields.
511  */
513 
514  /**
515  * Specifies the behavior for the key.
516  */
518 
519  /**
520  * Algorithm used to determine target node.
521  */
523 
524  /**
525  * Read policy for AP (availability) namespaces.
526  * Default: AS_POLICY_READ_MODE_AP_ONE
527  */
529 
530  /**
531  * Read policy for SC (strong consistency) namespaces.
532  * Default: AS_POLICY_READ_MODE_SC_SESSION
533  */
535 
536  /**
537  * Should raw bytes representing a list or map be deserialized to as_list or as_map.
538  * Set to false for backup programs that just need access to raw bytes.
539  *
540  * Default: true
541  */
543 
544  /**
545  * Should as_record instance be allocated on the heap before user listener is called in
546  * async commands. If true, the user is responsible for calling as_record_destroy() when done
547  * with the record. If false, as_record_destroy() is automatically called by the client after
548  * the user listener function completes. This field is ignored for sync commands.
549  *
550  * Default: false
551  */
553 
555 
556 /**
557  * Write Policy
558  *
559  * @ingroup client_policies
560  */
561 typedef struct as_policy_write_s {
562 
563  /**
564  * Generic policy fields.
565  */
567 
568  /**
569  * Specifies the behavior for the key.
570  */
572 
573  /**
574  * Algorithm used to determine target node.
575  */
577 
578  /**
579  * Specifies the number of replicas required to be committed successfully when writing
580  * before returning transaction succeeded.
581  */
583 
584  /**
585  * Specifies the behavior for the generation value.
586  */
588 
589  /**
590  * Specifies the behavior for the existence of the record.
591  */
593 
594  /**
595  * The default time-to-live (expiration) of the record in seconds. This field will
596  * only be used if "as_record.ttl" is set to AS_RECORD_CLIENT_DEFAULT_TTL. The
597  * as_record instance is passed in to write functions along with as_policy_write.
598  *
599  * There are also special values that can be set in the record ttl:
600  * <ul>
601  * <li>AS_RECORD_DEFAULT_TTL: Use the server default ttl from the namespace.</li>
602  * <li>AS_RECORD_NO_EXPIRE_TTL: Do not expire the record.</li>
603  * <li>AS_RECORD_NO_CHANGE_TTL: Keep the existing record ttl when the record is updated.</li>
604  * </ul>
605  */
606  uint32_t ttl;
607 
608  /**
609  * Minimum record size beyond which it is compressed and sent to the server.
610  */
612 
613  /**
614  * If the transaction results in a record deletion, leave a tombstone for the record.
615  * This prevents deleted records from reappearing after node failures.
616  * Valid for Aerospike Server Enterprise Edition only.
617  *
618  * Default: false (do not tombstone deleted records).
619  */
621 
623 
624 /**
625  * Key Apply Policy
626  *
627  * @ingroup client_policies
628  */
629 typedef struct as_policy_apply_s {
630 
631  /**
632  * Generic policy fields.
633  */
635 
636  /**
637  * Specifies the behavior for the key.
638  */
640 
641  /**
642  * Algorithm used to determine target node.
643  */
645 
646  /**
647  * Specifies the number of replicas required to be committed successfully when writing
648  * before returning transaction succeeded.
649  */
651 
652  /**
653  * The time-to-live (expiration) of the record in seconds. Note that ttl
654  * is only used on write/update calls.
655  *
656  * There are also special values that can be set in the record ttl:
657  * <ul>
658  * <li>AS_RECORD_DEFAULT_TTL: Use the server default ttl from the namespace.</li>
659  * <li>AS_RECORD_NO_EXPIRE_TTL: Do not expire the record.</li>
660  * <li>AS_RECORD_NO_CHANGE_TTL: Keep the existing record ttl when the record is updated.</li>
661  * </ul>
662  */
663  uint32_t ttl;
664 
665  /**
666  * If the transaction results in a record deletion, leave a tombstone for the record.
667  * This prevents deleted records from reappearing after node failures.
668  * Valid for Aerospike Server Enterprise Edition only.
669  *
670  * Default: false (do not tombstone deleted records).
671  */
673 
675 
676 /**
677  * Operate Policy
678  *
679  * @ingroup client_policies
680  */
681 typedef struct as_policy_operate_s {
682 
683  /**
684  * Generic policy fields.
685  */
687 
688  /**
689  * Specifies the behavior for the key.
690  */
692 
693  /**
694  * Algorithm used to determine target node.
695  */
697 
698  /**
699  * Read policy for AP (availability) namespaces.
700  * Default: AS_POLICY_READ_MODE_AP_ONE
701  */
703 
704  /**
705  * Read policy for SC (strong consistency) namespaces.
706  * Default: AS_POLICY_READ_MODE_SC_SESSION
707  */
709 
710  /**
711  * Specifies the number of replicas required to be committed successfully when writing
712  * before returning transaction succeeded.
713  */
715 
716  /**
717  * Specifies the behavior for the generation value.
718  */
720 
721  /**
722  * Specifies the behavior for the existence of the record.
723  */
725 
726  /**
727  * The default time-to-live (expiration) of the record in seconds. This field will
728  * only be used if "as_operations.ttl" is set to AS_RECORD_CLIENT_DEFAULT_TTL. The
729  * as_operations instance is passed in to operate functions along with as_policy_operate.
730  *
731  * There are also special values that can be set in the record ttl:
732  * <ul>
733  * <li>AS_RECORD_DEFAULT_TTL: Use the server default ttl from the namespace.</li>
734  * <li>AS_RECORD_NO_EXPIRE_TTL: Do not expire the record.</li>
735  * <li>AS_RECORD_NO_CHANGE_TTL: Keep the existing record ttl when the record is updated.</li>
736  * </ul>
737  */
738  uint32_t ttl;
739 
740  /**
741  * Should raw bytes representing a list or map be deserialized to as_list or as_map.
742  * Set to false for backup programs that just need access to raw bytes.
743  *
744  * Default: true
745  */
747 
748  /**
749  * If the transaction results in a record deletion, leave a tombstone for the record.
750  * This prevents deleted records from reappearing after node failures.
751  * Valid for Aerospike Server Enterprise Edition only.
752  *
753  * Default: false (do not tombstone deleted records).
754  */
756 
757  /**
758  * Should as_record instance be allocated on the heap before user listener is called in
759  * async commands. If true, the user is responsible for calling as_record_destroy() when done
760  * with the record. If false, as_record_destroy() is automatically called by the client after
761  * the user listener function completes. This field is ignored for sync commands.
762  *
763  * Default: false
764  */
766 
768 
769 /**
770  * Remove Policy
771  *
772  * @ingroup client_policies
773  */
774 typedef struct as_policy_remove_s {
775 
776  /**
777  * Generic policy fields.
778  */
780 
781  /**
782  * Specifies the behavior for the key.
783  */
785 
786  /**
787  * Algorithm used to determine target node.
788  */
790 
791  /**
792  * Specifies the number of replicas required to be committed successfully when writing
793  * before returning transaction succeeded.
794  */
796 
797  /**
798  * Specifies the behavior for the generation value.
799  */
801 
802  /**
803  * The generation of the record.
804  */
805  uint16_t generation;
806 
807  /**
808  * If the transaction results in a record deletion, leave a tombstone for the record.
809  * This prevents deleted records from reappearing after node failures.
810  * Valid for Aerospike Server Enterprise Edition only.
811  *
812  * Default: false (do not tombstone deleted records).
813  */
815 
817 
818 /**
819  * Batch parent policy.
820  *
821  * @ingroup client_policies
822  */
823 typedef struct as_policy_batch_s {
824 
825  /**
826  * Generic policy fields.
827  */
829 
830  /**
831  * Algorithm used to determine target node.
832  */
834 
835  /**
836  * Read policy for AP (availability) namespaces.
837  * Default: AS_POLICY_READ_MODE_AP_ONE
838  */
840 
841  /**
842  * Read policy for SC (strong consistency) namespaces.
843  * Default: AS_POLICY_READ_MODE_SC_SESSION
844  */
846 
847  /**
848  * Determine if batch commands to each server are run in parallel threads.
849  *
850  * Values:
851  * <ul>
852  * <li>
853  * false: Issue batch commands sequentially. This mode has a performance advantage for small
854  * to medium sized batch sizes because commands can be issued in the main transaction thread.
855  * This is the default.
856  * </li>
857  * <li>
858  * true: Issue batch commands in parallel threads. This mode has a performance
859  * advantage for large batch sizes because each node can process the command immediately.
860  * The downside is extra threads will need to be created (or taken from
861  * a thread pool).
862  * </li>
863  * </ul>
864  */
866 
867  /**
868  * Allow batch to be processed immediately in the server's receiving thread for in-memory
869  * namespaces. If false, the batch will always be processed in separate service threads.
870  *
871  * For batch transactions with smaller sized records (&lt;= 1K per record), inline
872  * processing will be significantly faster on in-memory namespaces.
873  *
874  * Inline processing can introduce the possibility of unfairness because the server
875  * can process the entire batch before moving onto the next command.
876  *
877  * Default: true
878  */
880 
881  /**
882  * Allow batch to be processed immediately in the server's receiving thread for SSD
883  * namespaces. If false, the batch will always be processed in separate service threads.
884  * Server versions &lt; 6.0 ignore this field.
885  *
886  * Inline processing can introduce the possibility of unfairness because the server
887  * can process the entire batch before moving onto the next command.
888  *
889  * Default: false
890  */
892 
893  /**
894  * Should all batch keys be attempted regardless of errors. This field is used on both
895  * the client and server. The client handles node specific errors and the server handles
896  * key specific errors.
897  *
898  * If true, every batch key is attempted regardless of previous key specific errors.
899  * Node specific errors such as timeouts stop keys to that node, but keys directed at
900  * other nodes will continue to be processed.
901  *
902  * If false, the server will stop the batch to its node on most key specific errors.
903  * The exceptions are AEROSPIKE_ERR_RECORD_NOT_FOUND and AEROSPIKE_FILTERED_OUT
904  * which never stop the batch. The client will stop the entire batch on node specific
905  * errors for sync commands that are run in sequence (concurrent == false). The client
906  * will not stop the entire batch for async commands or sync commands run in parallel.
907  *
908  * Server versions &lt; 6.0 do not support this field and treat this value as false
909  * for key specific errors.
910  *
911  * Default: true
912  */
914 
915  /**
916  * This method is deprecated and will eventually be removed.
917  * The set name is now always sent for every distinct namespace/set in the batch.
918  *
919  * Send set name field to server for every key in the batch for batch index protocol.
920  * This is necessary for batch writes and batch reads when authentication is enabled and
921  * security roles are defined on a per set basis.
922  *
923  * @deprecated Set name always sent.
924  */
926 
927  /**
928  * Should raw bytes be deserialized to as_list or as_map. Set to false for backup programs that
929  * just need access to raw bytes.
930  *
931  * Default: true
932  */
934 
936 
937 /**
938  * Policy attributes used in batch read commands.
939  * @ingroup client_policies
940  */
941 typedef struct as_policy_batch_read_s {
942  /**
943  * Optional expression filter. If filter_exp exists and evaluates to false, the
944  * transaction is ignored. This can be used to eliminate a client/server roundtrip
945  * in some cases.
946  *
947  * aerospike_destroy() automatically calls as_exp_destroy() on all global default
948  * policy filter expression instances. The user is responsible for calling as_exp_destroy()
949  * on filter expressions when setting temporary transaction policies.
950  *
951  * Default: NULL
952  */
954 
955  /**
956  * Read policy for AP (availability) namespaces.
957  * Default: AS_POLICY_READ_MODE_AP_ONE
958  */
960 
961  /**
962  * Read policy for SC (strong consistency) namespaces.
963  * Default: AS_POLICY_READ_MODE_SC_SESSION
964  */
966 
968 
969 /**
970  * Policy attributes used in batch write commands.
971  * @ingroup client_policies
972  */
973 typedef struct as_policy_batch_write_s {
974  /**
975  * Optional expression filter. If filter_exp exists and evaluates to false, the
976  * transaction is ignored. This can be used to eliminate a client/server roundtrip
977  * in some cases.
978  *
979  * aerospike_destroy() automatically calls as_exp_destroy() on all global default
980  * policy filter expression instances. The user is responsible for calling as_exp_destroy()
981  * on filter expressions when setting temporary transaction policies.
982  *
983  * Default: NULL
984  */
986 
987  /**
988  * Specifies the behavior for the key.
989  */
991 
992  /**
993  * Specifies the number of replicas required to be committed successfully when writing
994  * before returning transaction succeeded.
995  */
997 
998  /**
999  * Specifies the behavior for the generation value.
1000  */
1002 
1003  /**
1004  * Specifies the behavior for the existence of the record.
1005  */
1007 
1008  /**
1009  * The default time-to-live (expiration) of the record in seconds. This field will only be
1010  * used if "as_operations.ttl" is set to AS_RECORD_CLIENT_DEFAULT_TTL. The as_operations
1011  * instance is passed in to batch write functions along with as_policy_batch_write.
1012  *
1013  * There are also special values that can be set in the record ttl:
1014  * <ul>
1015  * <li>AS_RECORD_DEFAULT_TTL: Use the server default ttl from the namespace.</li>
1016  * <li>AS_RECORD_NO_EXPIRE_TTL: Do not expire the record.</li>
1017  * <li>AS_RECORD_NO_CHANGE_TTL: Keep the existing record ttl when the record is updated.</li>
1018  * </ul>
1019  */
1020  uint32_t ttl;
1021 
1022  /**
1023  * If the transaction results in a record deletion, leave a tombstone for the record.
1024  * This prevents deleted records from reappearing after node failures.
1025  * Valid for Aerospike Server Enterprise Edition only.
1026  *
1027  * Default: false (do not tombstone deleted records).
1028  */
1030 
1032 
1033 /**
1034  * Policy attributes used in batch UDF apply commands.
1035  * @ingroup client_policies
1036  */
1037 typedef struct as_policy_batch_apply_s {
1038  /**
1039  * Optional expression filter. If filter_exp exists and evaluates to false, the
1040  * transaction is ignored. This can be used to eliminate a client/server roundtrip
1041  * in some cases.
1042  *
1043  * aerospike_destroy() automatically calls as_exp_destroy() on all global default
1044  * policy filter expression instances. The user is responsible for calling as_exp_destroy()
1045  * on filter expressions when setting temporary transaction policies.
1046  *
1047  * Default: NULL
1048  */
1050 
1051  /**
1052  * Specifies the behavior for the key.
1053  */
1055 
1056  /**
1057  * Specifies the number of replicas required to be committed successfully when writing
1058  * before returning transaction succeeded.
1059  */
1061 
1062  /**
1063  * The time-to-live (expiration) of the record in seconds. Note that ttl
1064  * is only used on write/update calls.
1065  *
1066  * There are also special values that can be set in the record ttl:
1067  * <ul>
1068  * <li>AS_RECORD_DEFAULT_TTL: Use the server default ttl from the namespace.</li>
1069  * <li>AS_RECORD_NO_EXPIRE_TTL: Do not expire the record.</li>
1070  * <li>AS_RECORD_NO_CHANGE_TTL: Keep the existing record ttl when the record is updated.</li>
1071  * </ul>
1072  */
1073  uint32_t ttl;
1074 
1075  /**
1076  * If the transaction results in a record deletion, leave a tombstone for the record.
1077  * This prevents deleted records from reappearing after node failures.
1078  * Valid for Aerospike Server Enterprise Edition only.
1079  *
1080  * Default: false (do not tombstone deleted records).
1081  */
1083 
1085 
1086 /**
1087  * Policy attributes used in batch remove commands.
1088  * @ingroup client_policies
1089  */
1090 typedef struct as_policy_batch_remove_s {
1091  /**
1092  * Optional expression filter. If filter_exp exists and evaluates to false, the
1093  * transaction is ignored. This can be used to eliminate a client/server roundtrip
1094  * in some cases.
1095  *
1096  * aerospike_destroy() automatically calls as_exp_destroy() on all global default
1097  * policy filter expression instances. The user is responsible for calling as_exp_destroy()
1098  * on filter expressions when setting temporary transaction policies.
1099  *
1100  * Default: NULL
1101  */
1103 
1104  /**
1105  * Specifies the behavior for the key.
1106  */
1108 
1109  /**
1110  * Specifies the number of replicas required to be committed successfully when writing
1111  * before returning transaction succeeded.
1112  */
1114 
1115  /**
1116  * Specifies the behavior for the generation value.
1117  */
1119 
1120  /**
1121  * The generation of the record.
1122  */
1123  uint16_t generation;
1124 
1125  /**
1126  * If the transaction results in a record deletion, leave a tombstone for the record.
1127  * This prevents deleted records from reappearing after node failures.
1128  * Valid for Aerospike Server Enterprise Edition only.
1129  *
1130  * Default: false (do not tombstone deleted records).
1131  */
1133 
1135 
1136 /**
1137  * Query Policy
1138  *
1139  * @ingroup client_policies
1140  */
1141 typedef struct as_policy_query_s {
1142 
1143  /**
1144  * Generic policy fields.
1145  */
1147 
1148  /**
1149  * Timeout used when info command is used that checks for cluster changes before and
1150  * after the query. This timeout is only used when fail_on_cluster_change is enabled.
1151  *
1152  * Default: 10000 ms
1153  */
1154  uint32_t info_timeout;
1155 
1156  /**
1157  * Algorithm used to determine target node.
1158  */
1160 
1161  /**
1162  * Terminate query if cluster is in migration state. If the server supports partition
1163  * queries or the query filter is null (scan), this field is ignored.
1164  *
1165  * Default: false
1166  */
1168 
1169  /**
1170  * Should raw bytes representing a list or map be deserialized to as_list or as_map.
1171  * Set to false for backup programs that just need access to raw bytes.
1172  *
1173  * Default: true
1174  */
1176 
1177  /**
1178  * Is query expected to return less than 100 records per node.
1179  * If true, the server will optimize the query for a small record set.
1180  * This field is ignored for aggregation queries, background queries
1181  * and server versions &lt; 6.0.
1182  *
1183  * Default: false
1184  */
1186 
1187 } as_policy_query;
1188 
1189 /**
1190  * Scan Policy
1191  *
1192  * @ingroup client_policies
1193  */
1194 typedef struct as_policy_scan_s {
1195 
1196  /**
1197  * Generic policy fields.
1198  */
1200 
1201  /**
1202  * Approximate number of records to return to client. This number is divided by the
1203  * number of nodes involved in the scan. The actual number of records returned
1204  * may be less than max_records if node record counts are small and unbalanced across
1205  * nodes.
1206  *
1207  * Default: 0 (do not limit record count)
1208  */
1209  uint64_t max_records;
1210 
1211  /**
1212  * Limit returned records per second (rps) rate for each server.
1213  * Do not apply rps limit if records_per_second is zero.
1214  *
1215  * Default: 0
1216  */
1218 
1219  /**
1220  * Algorithm used to determine target node.
1221  */
1223 
1224  /**
1225  * The default time-to-live (expiration) of the record in seconds. This field will only be
1226  * used on background scan writes if "as_scan.ttl" is set to AS_RECORD_CLIENT_DEFAULT_TTL.
1227  *
1228  * There are also special values that can be set in the record ttl:
1229  * <ul>
1230  * <li>AS_RECORD_DEFAULT_TTL: Use the server default ttl from the namespace.</li>
1231  * <li>AS_RECORD_NO_EXPIRE_TTL: Do not expire the record.</li>
1232  * <li>AS_RECORD_NO_CHANGE_TTL: Keep the existing record ttl when the record is updated.</li>
1233  * </ul>
1234  */
1235  uint32_t ttl;
1236 
1237  /**
1238  * If the transaction results in a record deletion, leave a tombstone for the record.
1239  * This prevents deleted records from reappearing after node failures.
1240  * Valid for Aerospike Server Enterprise Edition only.
1241  *
1242  * Default: false (do not tombstone deleted records).
1243  */
1245 
1246 } as_policy_scan;
1247 
1248 /**
1249  * Info Policy
1250  *
1251  * @ingroup client_policies
1252  */
1253 typedef struct as_policy_info_s {
1254 
1255  /**
1256  * Maximum time in milliseconds to wait for the operation to complete.
1257  */
1258  uint32_t timeout;
1259 
1260  /**
1261  * Send request without any further processing.
1262  */
1264 
1265  /**
1266  * Ensure the request is within allowable size limits.
1267  */
1269 
1270 } as_policy_info;
1271 
1272 /**
1273  * Administration Policy
1274  *
1275  * @ingroup client_policies
1276  */
1277 typedef struct as_policy_admin_s {
1278 
1279  /**
1280  * Maximum time in milliseconds to wait for the operation to complete.
1281  */
1282  uint32_t timeout;
1283 
1284 } as_policy_admin;
1285 
1286 /**
1287  * Struct of all policy values and operation policies.
1288  *
1289  * This is utilized by as_config to define default values for policies.
1290  *
1291  * @ingroup as_config_t
1292  */
1293 typedef struct as_policies_s {
1294 
1295  /**
1296  * The default read policy.
1297  */
1299 
1300  /**
1301  * The default write policy.
1302  */
1304 
1305  /**
1306  * The default operate policy.
1307  */
1309 
1310  /**
1311  * The default remove policy.
1312  */
1314 
1315  /**
1316  * The default apply policy.
1317  */
1319 
1320  /**
1321  * Default parent policy used in batch read commands.
1322  */
1324 
1325  /**
1326  * Default parent policy used in batch write commands.
1327  */
1329 
1330  /**
1331  * Default write policy used in batch operate commands.
1332  */
1334 
1335  /**
1336  * Default user defined function policy used in batch UDF apply commands.
1337  */
1339 
1340  /**
1341  * Default delete policy used in batch remove commands.
1342  */
1344 
1345  /**
1346  * The default scan policy.
1347  */
1349 
1350  /**
1351  * The default query policy.
1352  */
1354 
1355  /**
1356  * The default info policy.
1357  */
1359 
1360  /**
1361  * The default administration policy.
1362  */
1364 
1365 } as_policies;
1366 
1367 /******************************************************************************
1368  * FUNCTIONS
1369  *****************************************************************************/
1370 
1371 /**
1372  * Initialize base defaults for reads.
1373  */
1374 static inline void
1376 {
1379  p->max_retries = 2;
1380  p->sleep_between_retries = 0;
1381  p->filter_exp = NULL;
1382  p->compress = false;
1383 }
1384 
1385 /**
1386  * Initialize base defaults for writes.
1387  */
1388 static inline void
1390 {
1393  p->max_retries = 0;
1394  p->sleep_between_retries = 0;
1395  p->filter_exp = NULL;
1396  p->compress = false;
1397 }
1398 
1399 /**
1400  * Initialize base defaults for scan/query.
1401  *
1402  * Set max_retries for scans and non-aggregation queries with a null filter.
1403  * All other queries are not retried.
1404  *
1405  * The latest servers support retries on individual data partitions.
1406  * This feature is useful when a cluster is migrating and partition(s)
1407  * are missed or incomplete on the first query (with null filter) attempt.
1408  *
1409  * If the first query attempt misses 2 of 4096 partitions, then only
1410  * those 2 partitions are retried in the next query attempt from the
1411  * last key digest received for each respective partition. A higher
1412  * default max_retries is used because it's wasteful to invalidate
1413  * all query results because a single partition was missed.
1414  */
1415 static inline void
1417 {
1419  p->total_timeout = 0;
1420  p->max_retries = 5;
1421  p->sleep_between_retries = 0;
1422  p->filter_exp = NULL;
1423  p->compress = false;
1424 }
1425 
1426 /**
1427  * Initialize as_policy_read to default values.
1428  *
1429  * @param p The policy to initialize.
1430  * @return The initialized policy.
1431  *
1432  * @relates as_policy_read
1433  */
1434 static inline as_policy_read*
1436 {
1442  p->deserialize = true;
1443  p->async_heap_rec = false;
1444  return p;
1445 }
1446 
1447 /**
1448  * Shallow copy as_policy_read values.
1449  *
1450  * @param src The source policy.
1451  * @param trg The target policy.
1452  *
1453  * @relates as_policy_read
1454  */
1455 static inline void
1457 {
1458  *trg = *src;
1459 }
1460 
1461 /**
1462  * Initialize as_policy_write to default values.
1463  *
1464  * @param p The policy to initialize.
1465  * @return The initialized policy.
1466  *
1467  * @relates as_policy_write
1468  */
1469 static inline as_policy_write*
1471 {
1478  p->ttl = 0; // AS_RECORD_DEFAULT_TTL
1480  p->durable_delete = false;
1481  return p;
1482 }
1483 
1484 /**
1485  * Shallow copy as_policy_write values.
1486  *
1487  * @param src The source policy.
1488  * @param trg The target policy.
1489  *
1490  * @relates as_policy_write
1491  */
1492 static inline void
1494 {
1495  *trg = *src;
1496 }
1497 
1498 /**
1499  * Initialize as_policy_operate to default values.
1500  *
1501  * @param p The policy to initialize.
1502  * @return The initialized policy.
1503  *
1504  * @relates as_policy_operate
1505  */
1506 static inline as_policy_operate*
1508 {
1517  p->ttl = 0; // AS_RECORD_DEFAULT_TTL
1518  p->deserialize = true;
1519  p->durable_delete = false;
1520  p->async_heap_rec = false;
1521  return p;
1522 }
1523 
1524 /**
1525  * Shallow copy as_policy_operate values.
1526  *
1527  * @param src The source policy.
1528  * @param trg The target policy.
1529  *
1530  * @relates as_policy_operate
1531  */
1532 static inline void
1534 {
1535  *trg = *src;
1536 }
1537 
1538 /**
1539  * Initialize as_policy_remove to default values.
1540  *
1541  * @param p The policy to initialize.
1542  * @return The initialized policy.
1543  *
1544  * @relates as_policy_remove
1545  */
1546 static inline as_policy_remove*
1548 {
1554  p->generation = 0;
1555  p->durable_delete = false;
1556  return p;
1557 }
1558 
1559 /**
1560  * Shallow copy as_policy_remove values.
1561  *
1562  * @param src The source policy.
1563  * @param trg The target policy.
1564  *
1565  * @relates as_policy_remove
1566  */
1567 static inline void
1569 {
1570  *trg = *src;
1571 }
1572 
1573 /**
1574  * Initialize as_policy_apply to default values.
1575  *
1576  * @param p The policy to initialize.
1577  * @return The initialized policy.
1578  *
1579  * @relates as_policy_apply
1580  */
1581 static inline as_policy_apply*
1583 {
1588  p->ttl = 0; // AS_RECORD_DEFAULT_TTL
1589  p->durable_delete = false;
1590  return p;
1591 }
1592 
1593 /**
1594  * Shallow copy as_policy_apply values.
1595  *
1596  * @param src The source policy.
1597  * @param trg The target policy.
1598  *
1599  * @relates as_policy_apply
1600  */
1601 static inline void
1603 {
1604  *trg = *src;
1605 }
1606 
1607 /**
1608  * Initialize as_policy_batch to default values.
1609  *
1610  * @param p The policy to initialize.
1611  * @return The initialized policy.
1612  *
1613  * @relates as_policy_batch
1614  */
1615 static inline as_policy_batch*
1617 {
1622  p->concurrent = false;
1623  p->allow_inline = true;
1624  p->allow_inline_ssd = false;
1625  p->respond_all_keys = true;
1626  p->send_set_name = true;
1627  p->deserialize = true;
1628  return p;
1629 }
1630 
1631 /**
1632  * Initialize as_policy_batch to default values when writes may occur.
1633  *
1634  * @param p The policy to initialize.
1635  * @return The initialized policy.
1636  *
1637  * @relates as_policy_batch
1638  */
1639 static inline as_policy_batch*
1641 {
1643  p->base.max_retries = 0;
1644  return p;
1645 }
1646 
1647 /**
1648  * Shallow copy as_policy_batch values.
1649  *
1650  * @param src The source policy.
1651  * @param trg The target policy.
1652  *
1653  * @relates as_policy_batch
1654  */
1655 static inline void
1657 {
1658  *trg = *src;
1659 }
1660 
1661 /**
1662  * Initialize as_policy_batch_read to default values.
1663  * @relates as_policy_batch_read
1664  */
1665 static inline as_policy_batch_read*
1667 {
1668  p->filter_exp = NULL;
1671  return p;
1672 }
1673 
1674 /**
1675  * Initialize as_policy_batch_write to default values.
1676  * @relates as_policy_batch_write
1677  */
1678 static inline as_policy_batch_write*
1680 {
1681  p->filter_exp = NULL;
1686  p->ttl = 0; // AS_RECORD_DEFAULT_TTL
1687  p->durable_delete = false;
1688  return p;
1689 }
1690 
1691 /**
1692  * Initialize as_policy_batch_apply to default values.
1693  * @relates as_policy_batch_apply
1694  */
1695 static inline as_policy_batch_apply*
1697 {
1698  p->filter_exp = NULL;
1701  p->ttl = 0; // AS_RECORD_DEFAULT_TTL
1702  p->durable_delete = false;
1703  return p;
1704 }
1705 
1706 /**
1707  * Initialize as_policy_batch_remove to default values.
1708  * @relates as_policy_batch_remove
1709  */
1710 static inline as_policy_batch_remove*
1712 {
1713  p->filter_exp = NULL;
1717  p->generation = 0;
1718  p->durable_delete = false;
1719  return p;
1720 }
1721 
1722 /**
1723  * Initialize as_policy_scan to default values.
1724  *
1725  * @param p The policy to initialize.
1726  * @return The initialized policy.
1727  *
1728  * @relates as_policy_scan
1729  */
1730 static inline as_policy_scan*
1732 {
1734  p->max_records = 0;
1735  p->records_per_second = 0;
1737  p->ttl = 0; // AS_RECORD_DEFAULT_TTL
1738  p->durable_delete = false;
1739  return p;
1740 }
1741 
1742 /**
1743  * Shallow copy as_policy_scan values.
1744  *
1745  * @param src The source policy.
1746  * @param trg The target policy.
1747  *
1748  * @relates as_policy_scan
1749  */
1750 static inline void
1752 {
1753  *trg = *src;
1754 }
1755 
1756 /**
1757  * Initialize as_policy_query to default values.
1758  *
1759  * @param p The policy to initialize.
1760  * @return The initialized policy.
1761  *
1762  * @relates as_policy_query
1763  */
1764 static inline as_policy_query*
1766 {
1768  p->info_timeout = 10000;
1770  p->fail_on_cluster_change = false;
1771  p->deserialize = true;
1772  p->short_query = false;
1773  return p;
1774 }
1775 
1776 /**
1777  * Shallow copy as_policy_query values.
1778  *
1779  * @param src The source policy.
1780  * @param trg The target policy.
1781  *
1782  * @relates as_policy_query
1783  */
1784 static inline void
1786 {
1787  *trg = *src;
1788 }
1789 
1790 /**
1791  * Initialize as_policy_info to default values.
1792  *
1793  * @param p The policy to initialize.
1794  * @return The initialized policy.
1795  *
1796  * @relates as_policy_info
1797  */
1798 static inline as_policy_info*
1800 {
1802  p->send_as_is = true;
1803  p->check_bounds = true;
1804  return p;
1805 }
1806 
1807 /**
1808  * Copy as_policy_info values.
1809  *
1810  * @param src The source policy.
1811  * @param trg The target policy.
1812  *
1813  * @relates as_policy_info
1814  */
1815 static inline void
1817 {
1818  *trg = *src;
1819 }
1820 
1821 /**
1822  * Initialize as_policy_admin to default values.
1823  *
1824  * @param p The policy to initialize.
1825  * @return The initialized policy.
1826  *
1827  * @relates as_policy_admin
1828  */
1829 static inline as_policy_admin*
1831 {
1833  return p;
1834 }
1835 
1836 /**
1837  * Copy as_policy_admin values.
1838  *
1839  * @param src The source policy.
1840  * @param trg The target policy.
1841  *
1842  * @relates as_policy_admin
1843  */
1844 static inline void
1846 {
1847  *trg = *src;
1848 }
1849 
1850 /**
1851  * @private
1852  * Initialize as_policies.
1853  *
1854  * @relates as_policies
1855  */
1856 as_policies*
1858 
1859 /**
1860  * @private
1861  * Destroy as_policies.
1862  *
1863  * @relates as_policies
1864  */
1865 void
1867 
1868 #ifdef __cplusplus
1869 } // end extern "C"
1870 #endif
static as_policy_batch * as_policy_batch_init(as_policy_batch *p)
Definition: as_policy.h:1616
as_policy_exists exists
Definition: as_policy.h:724
as_policy_read_mode_ap read_mode_ap
Definition: as_policy.h:959
struct as_exp * filter_exp
Definition: as_policy.h:1049
static as_policy_operate * as_policy_operate_init(as_policy_operate *p)
Definition: as_policy.h:1507
as_policy_key
Definition: as_policy.h:200
static as_policy_apply * as_policy_apply_init(as_policy_apply *p)
Definition: as_policy.h:1582
static void as_policy_base_read_init(as_policy_base *p)
Definition: as_policy.h:1375
static void as_policy_base_query_init(as_policy_base *p)
Definition: as_policy.h:1416
static as_policy_query * as_policy_query_init(as_policy_query *p)
Definition: as_policy.h:1765
uint32_t socket_timeout
Definition: as_policy.h:405
as_policy_replica
Definition: as_policy.h:272
as_policy_scan scan
Definition: as_policy.h:1348
as_policy_replica replica
Definition: as_policy.h:522
as_policy_gen gen
Definition: as_policy.h:1118
static as_policy_info * as_policy_info_init(as_policy_info *p)
Definition: as_policy.h:1799
as_policy_commit_level commit_level
Definition: as_policy.h:795
as_policy_read_mode_ap read_mode_ap
Definition: as_policy.h:702
bool deserialize
Definition: as_policy.h:542
static as_policy_batch * as_policy_batch_parent_write_init(as_policy_batch *p)
Definition: as_policy.h:1640
bool allow_inline_ssd
Definition: as_policy.h:891
uint32_t max_retries
Definition: as_policy.h:442
as_policy_admin admin
Definition: as_policy.h:1363
static void as_policy_operate_copy(const as_policy_operate *src, as_policy_operate *trg)
Definition: as_policy.h:1533
as_policy_commit_level
Definition: as_policy.h:370
as_policy_key key
Definition: as_policy.h:517
static as_policy_batch_apply * as_policy_batch_apply_init(as_policy_batch_apply *p)
Definition: as_policy.h:1696
as_policy_gen gen
Definition: as_policy.h:800
as_policy_replica replica
Definition: as_policy.h:644
as_policy_base base
Definition: as_policy.h:1146
static void as_policy_base_write_init(as_policy_base *p)
Definition: as_policy.h:1389
as_policy_batch_write batch_write
Definition: as_policy.h:1333
as_policy_gen
Definition: as_policy.h:172
as_policy_base base
Definition: as_policy.h:634
as_policy_retry
Definition: as_policy.h:149
static void as_policy_read_copy(const as_policy_read *src, as_policy_read *trg)
Definition: as_policy.h:1456
as_policy_key key
Definition: as_policy.h:784
as_policy_commit_level commit_level
Definition: as_policy.h:1060
bool respond_all_keys
Definition: as_policy.h:913
as_policy_commit_level commit_level
Definition: as_policy.h:714
as_policy_batch batch_parent_write
Definition: as_policy.h:1328
struct as_exp * filter_exp
Definition: as_policy.h:486
void as_policies_destroy(as_policies *p)
#define AS_POLICY_COMPRESSION_THRESHOLD_DEFAULT
Definition: as_policy.h:85
as_policy_commit_level commit_level
Definition: as_policy.h:996
uint32_t timeout
Definition: as_policy.h:1282
as_policy_key key
Definition: as_policy.h:1054
static void as_policy_admin_copy(const as_policy_admin *src, as_policy_admin *trg)
Definition: as_policy.h:1845
static as_policy_read * as_policy_read_init(as_policy_read *p)
Definition: as_policy.h:1435
as_policy_key key
Definition: as_policy.h:691
as_policy_exists
Definition: as_policy.h:236
#define AS_POLICY_TOTAL_TIMEOUT_DEFAULT
Definition: as_policy.h:78
as_policy_info info
Definition: as_policy.h:1358
uint32_t compression_threshold
Definition: as_policy.h:611
as_policy_write write
Definition: as_policy.h:1303
as_policy_exists exists
Definition: as_policy.h:1006
as_policy_apply apply
Definition: as_policy.h:1318
uint32_t timeout
Definition: as_policy.h:1258
as_policy_read_mode_ap read_mode_ap
Definition: as_policy.h:839
#define AS_POLICY_REPLICA_DEFAULT
Definition: as_policy.h:113
uint32_t records_per_second
Definition: as_policy.h:1217
static as_policy_remove * as_policy_remove_init(as_policy_remove *p)
Definition: as_policy.h:1547
uint32_t ttl
Definition: as_policy.h:663
as_policy_gen gen
Definition: as_policy.h:1001
as_policy_query query
Definition: as_policy.h:1353
uint32_t ttl
Definition: as_policy.h:606
static as_policy_batch_read * as_policy_batch_read_init(as_policy_batch_read *p)
Definition: as_policy.h:1666
as_policy_operate operate
Definition: as_policy.h:1308
as_policy_base base
Definition: as_policy.h:779
Definition: as_exp.h:182
bool durable_delete
Definition: as_policy.h:620
static as_policy_admin * as_policy_admin_init(as_policy_admin *p)
Definition: as_policy.h:1830
static void as_policy_remove_copy(const as_policy_remove *src, as_policy_remove *trg)
Definition: as_policy.h:1568
as_policy_read_mode_sc read_mode_sc
Definition: as_policy.h:845
static void as_policy_batch_copy(const as_policy_batch *src, as_policy_batch *trg)
Definition: as_policy.h:1656
static as_policy_batch_write * as_policy_batch_write_init(as_policy_batch_write *p)
Definition: as_policy.h:1679
struct as_exp * filter_exp
Definition: as_policy.h:953
as_policy_batch_remove batch_remove
Definition: as_policy.h:1343
as_policy_key key
Definition: as_policy.h:990
struct as_exp * filter_exp
Definition: as_policy.h:1102
as_policy_replica replica
Definition: as_policy.h:576
uint32_t sleep_between_retries
Definition: as_policy.h:462
as_policy_replica replica
Definition: as_policy.h:833
#define AS_POLICY_KEY_DEFAULT
Definition: as_policy.h:99
as_policies * as_policies_init(as_policies *p)
bool durable_delete
Definition: as_policy.h:672
static void as_policy_write_copy(const as_policy_write *src, as_policy_write *trg)
Definition: as_policy.h:1493
as_policy_read_mode_sc read_mode_sc
Definition: as_policy.h:534
as_policy_replica replica
Definition: as_policy.h:789
as_policy_commit_level commit_level
Definition: as_policy.h:1113
uint64_t max_records
Definition: as_policy.h:1209
#define AS_POLICY_READ_MODE_SC_DEFAULT
Definition: as_policy.h:127
as_policy_key key
Definition: as_policy.h:639
bool fail_on_cluster_change
Definition: as_policy.h:1167
bool durable_delete
Definition: as_policy.h:1244
static as_policy_batch_remove * as_policy_batch_remove_init(as_policy_batch_remove *p)
Definition: as_policy.h:1711
as_policy_replica replica
Definition: as_policy.h:1159
#define AS_POLICY_GEN_DEFAULT
Definition: as_policy.h:92
as_policy_gen gen
Definition: as_policy.h:719
bool send_set_name
Definition: as_policy.h:925
as_policy_base base
Definition: as_policy.h:566
uint32_t total_timeout
Definition: as_policy.h:420
as_policy_read read
Definition: as_policy.h:1298
as_policy_batch batch
Definition: as_policy.h:1323
#define AS_POLICY_READ_MODE_AP_DEFAULT
Definition: as_policy.h:120
struct as_exp * filter_exp
Definition: as_policy.h:985
as_policy_base base
Definition: as_policy.h:1199
as_policy_read_mode_ap
Definition: as_policy.h:312
as_policy_base base
Definition: as_policy.h:686
#define AS_POLICY_EXISTS_DEFAULT
Definition: as_policy.h:106
as_policy_exists exists
Definition: as_policy.h:592
uint32_t info_timeout
Definition: as_policy.h:1154
as_policy_read_mode_ap read_mode_ap
Definition: as_policy.h:528
static void as_policy_apply_copy(const as_policy_apply *src, as_policy_apply *trg)
Definition: as_policy.h:1602
#define AS_POLICY_COMMIT_LEVEL_DEFAULT
Definition: as_policy.h:134
as_policy_key key
Definition: as_policy.h:571
as_policy_commit_level commit_level
Definition: as_policy.h:582
static as_policy_scan * as_policy_scan_init(as_policy_scan *p)
Definition: as_policy.h:1731
as_policy_replica replica
Definition: as_policy.h:1222
as_policy_key key
Definition: as_policy.h:1107
static as_policy_write * as_policy_write_init(as_policy_write *p)
Definition: as_policy.h:1470
bool async_heap_rec
Definition: as_policy.h:552
as_policy_read_mode_sc
Definition: as_policy.h:333
static void as_policy_info_copy(const as_policy_info *src, as_policy_info *trg)
Definition: as_policy.h:1816
uint32_t ttl
Definition: as_policy.h:1235
as_policy_batch_apply batch_apply
Definition: as_policy.h:1338
as_policy_gen gen
Definition: as_policy.h:587
as_policy_base base
Definition: as_policy.h:828
static void as_policy_scan_copy(const as_policy_scan *src, as_policy_scan *trg)
Definition: as_policy.h:1751
as_policy_read_mode_sc read_mode_sc
Definition: as_policy.h:708
as_policy_commit_level commit_level
Definition: as_policy.h:650
static void as_policy_query_copy(const as_policy_query *src, as_policy_query *trg)
Definition: as_policy.h:1785
as_policy_replica replica
Definition: as_policy.h:696
uint16_t generation
Definition: as_policy.h:805
as_policy_read_mode_sc read_mode_sc
Definition: as_policy.h:965
as_policy_base base
Definition: as_policy.h:512
#define AS_POLICY_SOCKET_TIMEOUT_DEFAULT
Definition: as_policy.h:71