@@ -100,6 +100,8 @@ static void CreateAgencyException(
100
100
static void JS_CasAgency (v8::FunctionCallbackInfo<v8::Value> const & args) {
101
101
TRI_V8_TRY_CATCH_BEGIN (isolate);
102
102
v8::HandleScope scope (isolate);
103
+
104
+ ONLY_IN_CLUSTER;
103
105
104
106
if (args.Length () < 3 ) {
105
107
TRI_V8_THROW_EXCEPTION_USAGE (
@@ -161,6 +163,8 @@ static void JS_CreateDirectoryAgency(
161
163
v8::FunctionCallbackInfo<v8::Value> const & args) {
162
164
TRI_V8_TRY_CATCH_BEGIN (isolate);
163
165
v8::HandleScope scope (isolate);
166
+
167
+ ONLY_IN_CLUSTER;
164
168
165
169
if (args.Length () != 1 ) {
166
170
TRI_V8_THROW_EXCEPTION_USAGE (" createDirectory(<key>)" );
@@ -208,6 +212,8 @@ static void JS_IncreaseVersionAgency(
208
212
v8::FunctionCallbackInfo<v8::Value> const & args) {
209
213
TRI_V8_TRY_CATCH_BEGIN (isolate)
210
214
v8::HandleScope scope (isolate);
215
+
216
+ ONLY_IN_CLUSTER;
211
217
212
218
if (args.Length () != 1 ) {
213
219
TRI_V8_THROW_EXCEPTION_USAGE (" increaseVersion(<key>)" );
@@ -232,6 +238,8 @@ static void JS_IncreaseVersionAgency(
232
238
static void JS_GetAgency (v8::FunctionCallbackInfo<v8::Value> const & args) {
233
239
TRI_V8_TRY_CATCH_BEGIN (isolate)
234
240
v8::HandleScope scope (isolate);
241
+
242
+ ONLY_IN_CLUSTER;
235
243
236
244
if (args.Length () < 1 ) {
237
245
TRI_V8_THROW_EXCEPTION_USAGE (" get(<key>)" );
@@ -272,6 +280,8 @@ static void JS_APIAgency(std::string const& envelope,
272
280
v8::FunctionCallbackInfo<v8::Value> const & args) {
273
281
TRI_V8_TRY_CATCH_BEGIN (isolate)
274
282
v8::HandleScope scope (isolate);
283
+
284
+ ONLY_IN_CLUSTER;
275
285
276
286
if (args.Length () < 1 ) {
277
287
TRI_V8_THROW_EXCEPTION_USAGE (std::string (envelope) + " ([[...]])" );
@@ -336,6 +346,8 @@ static void JS_TransactAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
336
346
static void JS_RemoveAgency (v8::FunctionCallbackInfo<v8::Value> const & args) {
337
347
TRI_V8_TRY_CATCH_BEGIN (isolate);
338
348
v8::HandleScope scope (isolate);
349
+
350
+ ONLY_IN_CLUSTER;
339
351
340
352
if (args.Length () < 1 ) {
341
353
TRI_V8_THROW_EXCEPTION_USAGE (" remove(<key>, <recursive>)" );
@@ -366,6 +378,8 @@ static void JS_RemoveAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
366
378
static void JS_SetAgency (v8::FunctionCallbackInfo<v8::Value> const & args) {
367
379
TRI_V8_TRY_CATCH_BEGIN (isolate);
368
380
v8::HandleScope scope (isolate);
381
+
382
+ ONLY_IN_CLUSTER;
369
383
370
384
if (args.Length () < 2 ) {
371
385
TRI_V8_THROW_EXCEPTION_USAGE (" set(<key>, <value>, <ttl>)" );
@@ -403,6 +417,8 @@ static void JS_SetAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
403
417
static void JS_Agency (v8::FunctionCallbackInfo<v8::Value> const & args) {
404
418
TRI_V8_TRY_CATCH_BEGIN (isolate)
405
419
v8::HandleScope scope (isolate);
420
+
421
+ ONLY_IN_CLUSTER;
406
422
407
423
if (args.Length () > 0 ) {
408
424
TRI_V8_THROW_EXCEPTION_USAGE (" agency()" );
@@ -453,6 +469,8 @@ static void JS_EndpointsAgency(
453
469
v8::FunctionCallbackInfo<v8::Value> const & args) {
454
470
TRI_V8_TRY_CATCH_BEGIN (isolate);
455
471
v8::HandleScope scope (isolate);
472
+
473
+ ONLY_IN_CLUSTER;
456
474
457
475
if (args.Length () != 0 ) {
458
476
TRI_V8_THROW_EXCEPTION_USAGE (" endpoints()" );
@@ -483,7 +501,7 @@ static void JS_EndpointsAgency(
483
501
static void JS_PrefixAgency (v8::FunctionCallbackInfo<v8::Value> const & args) {
484
502
TRI_V8_TRY_CATCH_BEGIN (isolate);
485
503
v8::HandleScope scope (isolate);
486
-
504
+
487
505
std::string const prefix = AgencyCommManager::path ();
488
506
489
507
TRI_V8_RETURN_STD_STRING (prefix);
@@ -497,6 +515,8 @@ static void JS_PrefixAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
497
515
static void JS_UniqidAgency (v8::FunctionCallbackInfo<v8::Value> const & args) {
498
516
TRI_V8_TRY_CATCH_BEGIN (isolate);
499
517
v8::HandleScope scope (isolate);
518
+
519
+ ONLY_IN_CLUSTER;
500
520
501
521
if (args.Length () > 2 ) {
502
522
TRI_V8_THROW_EXCEPTION_USAGE (" uniqid(<count>, <timeout>)" );
@@ -532,6 +552,8 @@ static void JS_UniqidAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
532
552
static void JS_VersionAgency (v8::FunctionCallbackInfo<v8::Value> const & args) {
533
553
TRI_V8_TRY_CATCH_BEGIN (isolate);
534
554
v8::HandleScope scope (isolate);
555
+
556
+ ONLY_IN_CLUSTER;
535
557
536
558
if (args.Length () != 0 ) {
537
559
TRI_V8_THROW_EXCEPTION_USAGE (" version()" );
0 commit comments