All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
as_txn_monitor.h
Go to the documentation of this file.
1/*
2 * Copyright 2008-2024 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#include <aerospike/aerospike.h>
20#include <aerospike/as_async.h>
21#include <aerospike/as_key.h>
22#include <aerospike/as_txn.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28//---------------------------------
29// Types
30//---------------------------------
31
32struct as_batch_s;
33struct as_batch_records_s;
34struct as_event_loop;
35
36//---------------------------------
37// Sync Functions
38//---------------------------------
39
42 aerospike* as, const as_policy_base* cmd_policy, const as_key* cmd_key, as_error* err
43 );
44
47 aerospike* as, const as_policy_base* cmd_policy, const struct as_batch_s* batch, as_error* err
48 );
49
52 aerospike* as, const as_policy_base* cmd_policy, struct as_batch_records_s* records, as_error* err
53 );
54
57 aerospike* as, as_error* err, const as_policy_base* base_policy, as_key* key
58 );
59
60//---------------------------------
61// Async Functions
62//---------------------------------
63
66 aerospike* as, as_error* err, const as_policy_base* cmd_policy, const as_key* cmd_key,
67 as_async_record_listener listener, void* udata, struct as_event_loop* event_loop
68 );
69
72 aerospike* as, as_error* err, as_txn* txn, const as_policy_base* cmd_policy,
73 struct as_batch_records_s* records, as_async_record_listener listener, void* udata,
74 as_event_loop* event_loop
75 );
76
79 aerospike* as, as_error* err, const as_policy_base* base_policy, as_key* key,
80 as_async_write_listener listener, void* udata, as_event_loop* event_loop
81 );
82
83//---------------------------------
84// Common Functions
85//---------------------------------
86
87static inline void
89{
90 as_key_init_int64(key, txn->ns, "<ERO~MRT", txn->id);
91}
92
93#ifdef __cplusplus
94} // end extern "C"
95#endif
void(* as_async_write_listener)(as_error *err, void *udata, as_event_loop *event_loop)
Definition as_listener.h:36
void(* as_async_record_listener)(as_error *err, as_record *record, void *udata, as_event_loop *event_loop)
Definition as_listener.h:48
as_status
Definition as_status.h:30
as_status as_txn_monitor_add_keys_batch(aerospike *as, const as_policy_base *cmd_policy, const struct as_batch_s *batch, as_error *err)
as_status as_txn_monitor_remove(aerospike *as, as_error *err, const as_policy_base *base_policy, as_key *key)
as_status as_txn_monitor_add_key(aerospike *as, const as_policy_base *cmd_policy, const as_key *cmd_key, as_error *err)
as_status as_txn_monitor_add_keys_records(aerospike *as, const as_policy_base *cmd_policy, struct as_batch_records_s *records, as_error *err)
as_status as_txn_monitor_add_key_async(aerospike *as, as_error *err, const as_policy_base *cmd_policy, const as_key *cmd_key, as_async_record_listener listener, void *udata, struct as_event_loop *event_loop)
as_status as_txn_monitor_remove_async(aerospike *as, as_error *err, const as_policy_base *base_policy, as_key *key, as_async_write_listener listener, void *udata, as_event_loop *event_loop)
static void as_txn_monitor_init_key(as_txn *txn, as_key *key)
as_status as_txn_monitor_add_keys_records_async(aerospike *as, as_error *err, as_txn *txn, const as_policy_base *cmd_policy, struct as_batch_records_s *records, as_async_record_listener listener, void *udata, as_event_loop *event_loop)
as_namespace ns
Definition as_txn.h:90
uint64_t id
Definition as_txn.h:89