aboutsummaryrefslogtreecommitdiff
path: root/mod/ci-common.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-10-22 17:48:48 +0300
committerFrancois Kritzinger <francois@codesynthesis.com>2024-12-10 16:34:15 +0200
commit86e549e50d8e77a01f701940979a631eec1d82c5 (patch)
tree8a4eeb2bf40072390b451046c86328a9e22b9651 /mod/ci-common.hxx
parenta576d5df6123da0bd5f84ba17dadec32d9f63bfc (diff)
Implement CI common API changes
Diffstat (limited to 'mod/ci-common.hxx')
-rw-r--r--mod/ci-common.hxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/mod/ci-common.hxx b/mod/ci-common.hxx
index 23e6360..df580e4 100644
--- a/mod/ci-common.hxx
+++ b/mod/ci-common.hxx
@@ -96,16 +96,18 @@ namespace brep
// having the same semantics as in the replace and ignore modes).
//
// Note also that the duplicate_tenant_mode::replace modes are not the
- // same as separate calls to create() and then to cancel() since the
- // latter would happen in two separate transactions and will thus be
- // racy. @@@ TODO
+ // same as separate calls to cancel() and then to create() since the
+ // latter would happen in two separate transactions and will thus be racy.
+ //
+ // Finally note that only duplicate_tenant_mode::fail can be used if the
+ // service id is empty.
//
// Note: should be called out of the database transaction.
//
enum class duplicate_tenant_mode {fail, ignore, replace, replace_archived};
enum class duplicate_tenant_result {created, ignored, replaced};
- pair<optional<string>, duplicate_tenant_result>
+ optional<pair<string, duplicate_tenant_result>>
create (const basic_mark& error,
const basic_mark& warn,
const basic_mark* trace,
@@ -136,8 +138,8 @@ namespace brep
// Specifically, this function clears the tenant service state (thus
// allowing reusing the same service type/id pair in another tenant) and
// archives the tenant, unless the tenant is unloaded, in which case it is
- // dropped (@@@ TODO). Note that the latter allow using unloaded tenants
- // as a relatively cheap asynchronous execution mechanism.
+ // dropped. Note that the latter allow using unloaded tenants as a
+ // relatively cheap asynchronous execution mechanism.
//
// Note: should be called out of the database transaction.
//
@@ -154,9 +156,9 @@ namespace brep
// is only used for tracing.
//
// Similarly to above, this function archives the tenant, unless the
- // tenant is unloaded, in which case it is dropped (@@@ TODO). Note,
- // however, that this version does not touch the service state (use the
- // above version if you want to clear it).
+ // tenant is unloaded, in which case it is dropped. Note, however, that
+ // this version does not touch the service state (use the above version if
+ // you want to clear it).
//
// Note: should be called out of the database transaction.
//