Class: VertxConsul::ConsulClient

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb

Overview

A Vert.x service used to interact with Consul.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


20
21
22
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 20

def @@j_api_type.accept?(obj)
  obj.class == ConsulClient
end

+ (::VertxConsul::ConsulClient) create(vertx) + (::VertxConsul::ConsulClient) create(vertx, options)

Create a Consul client.

Overloads:

Returns:



407
408
409
410
411
412
413
414
415
416
417
418
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 407

def self.create(*args)
  if args[0].class.method_defined?(:j_del) && !block_given? && args[1] == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::ConsulClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(args[0].j_del),::VertxConsul::ConsulClient)
  elsif args[0].class.method_defined?(:j_del) && args[1].class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::ConsulClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(args[0].j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(args[1]))),::VertxConsul::ConsulClient)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create(#{args[0]},#{args[1]})"
  end
end

+ (Object) j_api_type



29
30
31
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 29

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 32

def self.j_class
  Java::IoVertxExtConsul::ConsulClient.java_class
end

+ (Object) unwrap(obj)



26
27
28
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 26

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



23
24
25
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 23

def @@j_api_type.wrap(obj)
  ConsulClient.new(obj)
end

Instance Method Details

- (self) agentInfo(resultHandler) { ... }

Returns the configuration and member information of the local agent

Yields:

  • will be provided with the configuration and member information of the local agent

Returns:

  • (self)


906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 906

def agent_info
  if true
    if (block_given?)
      @j_del.java_method(:agentInfo, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:agentInfo, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling agent_info()"
  end
end

- (self) catalogDatacenters(resultHandler) { ... }

Return all the datacenters that are known by the Consul server

Yields:

  • will be provided with list of datacenters

Returns:

  • (self)


383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 383

def catalog_datacenters
  if true
    if (block_given?)
      @j_del.java_method(:catalogDatacenters, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogDatacenters, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_datacenters()"
  end
end

- (self) catalogNodeServices(node, resultHandler) { ... }

Returns the node's registered services

Parameters:

  • node (String)
    node name

Yields:

  • will be provided with list of services

Returns:

  • (self)


1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1275

def catalog_node_services(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:catalogNodeServices, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogNodeServices, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_node_services(#{args[0]})"
  end
end

- (self) catalogNodeServicesWithOptions(node, options, resultHandler) { ... }

Returns the node's registered services This is blocking query unlike #catalog_node_services

Parameters:

  • node (String)
    node name
  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with list of services

Returns:

  • (self)


297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 297

def catalog_node_services_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:catalogNodeServicesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogNodeServicesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_node_services_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) catalogNodes(resultHandler) { ... }

Returns the nodes registered in a datacenter

Yields:

  • will be provided with list of nodes

Returns:

  • (self)


798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 798

def catalog_nodes
  if true
    if (block_given?)
      @j_del.java_method(:catalogNodes, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogNodes, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::NodeList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_nodes()"
  end
end

- (self) catalogNodesWithOptions(options, resultHandler) { ... }

Returns the nodes registered in a datacenter

Parameters:

  • options (Hash{String => Object})
    options used to request nodes

Yields:

  • will be provided with list of nodes

Returns:

  • (self)


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 40

def catalog_nodes_with_options(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:catalogNodesWithOptions, [Java::IoVertxExtConsul::NodeQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::NodeQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogNodesWithOptions, [Java::IoVertxExtConsul::NodeQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::NodeQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::NodeList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_nodes_with_options(#{args[0]})"
  end
end

- (self) catalogServiceNodes(service, resultHandler) { ... }

Returns the nodes providing a service

Parameters:

  • service (String)
    name of service

Yields:

  • will be provided with list of nodes providing given service

Returns:

  • (self)


468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 468

def catalog_service_nodes(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:catalogServiceNodes, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogServiceNodes, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_service_nodes(#{args[0]})"
  end
end

- (self) catalogServiceNodesWithOptions(service, options, resultHandler) { ... }

Returns the nodes providing a service

Parameters:

  • service (String)
    name of service
  • options (Hash{String => Object})
    options used to request services

Yields:

  • will be provided with list of nodes providing given service

Returns:

  • (self)


1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1461

def catalog_service_nodes_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:catalogServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::ServiceQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::ServiceQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::ServiceQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::ServiceQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_service_nodes_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) catalogServices(resultHandler) { ... }

Returns the services registered in a datacenter

Yields:

  • will be provided with list of services

Returns:

  • (self)


1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1528

def catalog_services
  if true
    if (block_given?)
      @j_del.java_method(:catalogServices, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogServices, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_services()"
  end
end

- (self) catalogServicesWithOptions(options, resultHandler) { ... }

Returns the services registered in a datacenter This is blocking query unlike #catalog_services

Parameters:

  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with list of services

Returns:

  • (self)


1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1149

def catalog_services_with_options(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:catalogServicesWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:catalogServicesWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling catalog_services_with_options(#{args[0]})"
  end
end

- (self) cloneAclToken(id, idHandler) { ... }

Clone Acl token

Parameters:

  • id (String)
    the ID of token to be cloned

Yields:

  • will be provided with ID of cloned token

Returns:

  • (self)


577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 577

def clone_acl_token(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:cloneAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:cloneAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling clone_acl_token(#{args[0]})"
  end
end

- (void) close

This method returns an undefined value.

Close the client and release its resources


1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1260

def close
  if !block_given?
    return @j_del.java_method(:close, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling close()"
  end
end

- (self) coordinateDatacenters(resultHandler) { ... }

Returns the WAN network coordinates for all Consul servers, organized by DCs

Yields:

  • will be provided with network coordinates for all Consul servers

Returns:

  • (self)


362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 362

def coordinate_datacenters
  if true
    if (block_given?)
      @j_del.java_method(:coordinateDatacenters, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:coordinateDatacenters, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling coordinate_datacenters()"
  end
end

- (self) coordinateNodes(resultHandler) { ... }

Returns the LAN network coordinates for all nodes in a given DC

Yields:

  • will be provided with network coordinates of nodes in datacenter

Returns:

  • (self)


1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1103

def coordinate_nodes
  if true
    if (block_given?)
      @j_del.java_method(:coordinateNodes, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:coordinateNodes, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::CoordinateList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling coordinate_nodes()"
  end
end

- (self) coordinateNodesWithOptions(options, resultHandler) { ... }

Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlike #coordinate_nodes

Parameters:

  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with network coordinates of nodes in datacenter

Returns:

  • (self)


555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 555

def coordinate_nodes_with_options(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:coordinateNodesWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:coordinateNodesWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::CoordinateList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling coordinate_nodes_with_options(#{args[0]})"
  end
end

- (self) createAclToken(token, idHandler) { ... }

Create new Acl token

Parameters:

  • token (Hash{String => Object})
    properties of the token

Yields:

  • will be provided with ID of created token

Returns:

  • (self)


1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1240

def create_acl_token(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:createAclToken, [Java::IoVertxExtConsul::AclToken.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::AclToken.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createAclToken, [Java::IoVertxExtConsul::AclToken.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::AclToken.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_acl_token(#{args[0]})"
  end
end

- (self) createPreparedQuery(definition, resultHandler) { ... }

Parameters:

  • definition (Hash{String => Object})
    definition of the prepare query

Yields:

  • will be provided with id of created prepare query

Returns:

  • (self)


777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 777

def create_prepared_query(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:createPreparedQuery, [Java::IoVertxExtConsul::PreparedQueryDefinition.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::PreparedQueryDefinition.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createPreparedQuery, [Java::IoVertxExtConsul::PreparedQueryDefinition.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::PreparedQueryDefinition.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_prepared_query(#{args[0]})"
  end
end

- (self) createSession(idHandler) { ... }

Initialize a new session

Yields:

  • will be provided with ID of new session

Returns:

  • (self)


972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 972

def create_session
  if true
    if (block_given?)
      @j_del.java_method(:createSession, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createSession, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_session()"
  end
end

- (self) createSessionWithOptions(options, idHandler) { ... }

Initialize a new session

Parameters:

  • options (Hash{String => Object})
    options used to create session

Yields:

  • will be provided with ID of new session

Returns:

  • (self)


319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 319

def create_session_with_options(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:createSessionWithOptions, [Java::IoVertxExtConsul::SessionOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::SessionOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createSessionWithOptions, [Java::IoVertxExtConsul::SessionOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::SessionOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_session_with_options(#{args[0]})"
  end
end

- (self) deletePreparedQuery(id, resultHandler) { ... }

Deletes an existing prepared query

Parameters:

  • id (String)
    the id of the query to delete

Yields:

  • will be called when complete

Returns:

  • (self)


490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 490

def delete_prepared_query(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:deletePreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:deletePreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling delete_prepared_query(#{args[0]})"
  end
end

- (self) deleteValue(key, resultHandler) { ... }

Remove the key/value pair that corresponding to the specified key

Parameters:

  • key (String)
    the key

Yields:

  • will be called on complete

Returns:

  • (self)


446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 446

def delete_value(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:deleteValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:deleteValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling delete_value(#{args[0]})"
  end
end

- (self) deleteValues(keyPrefix, resultHandler) { ... }

Removes all the key/value pair that corresponding to the specified key prefix

Parameters:

  • keyPrefix (String)
    the prefix

Yields:

  • will be called on complete

Returns:

  • (self)


1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1572

def delete_values(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:deleteValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:deleteValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling delete_values(#{args[0]})"
  end
end

- (self) deregisterCheck(checkId, resultHandler) { ... }

Remove a check from the local agent. The agent will take care of deregistering the check from the Catalog.

Parameters:

  • checkId (String)
    the ID of check

Yields:

  • will be called when complete

Returns:

  • (self)


244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 244

def deregister_check(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:deregisterCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:deregisterCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling deregister_check(#{args[0]})"
  end
end

- (self) deregisterService(id, resultHandler) { ... }

Remove a service from the local agent. The agent will take care of deregistering the service with the Catalog. If there is an associated check, that is also deregistered.

Parameters:

  • id (String)
    the ID of service

Yields:

  • will be called when complete

Returns:

  • (self)


152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 152

def deregister_service(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:deregisterService, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:deregisterService, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling deregister_service(#{args[0]})"
  end
end

- (self) destroyAclToken(id, resultHandler) { ... }

Destroy Acl token

Parameters:

  • id (String)
    the ID of token

Yields:

  • will be called on complete

Returns:

  • (self)


885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 885

def destroy_acl_token(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:destroyAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:destroyAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling destroy_acl_token(#{args[0]})"
  end
end

- (self) destroySession(id, resultHandler) { ... }

Destroys the given session

Parameters:

  • id (String)
    the ID of session

Yields:

  • will be called when complete

Returns:

  • (self)


599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 599

def destroy_session(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:destroySession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:destroySession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling destroy_session(#{args[0]})"
  end
end

- (self) executePreparedQuery(query, resultHandler) { ... }

Executes an existing prepared query.

Parameters:

  • query (String)
    the ID of the query to execute. This can also be the name of an existing prepared query, or a name that matches a prefix name for a prepared query template.

Yields:

  • will be provided with response

Returns:

  • (self)


928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 928

def execute_prepared_query(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:executePreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:executePreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::PreparedQueryExecuteResponse))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling execute_prepared_query(#{args[0]})"
  end
end

- (self) executePreparedQueryWithOptions(query, options, resultHandler) { ... }

Executes an existing prepared query.

Parameters:

  • query (String)
    the ID of the query to execute. This can also be the name of an existing prepared query, or a name that matches a prefix name for a prepared query template.
  • options (Hash{String => Object})
    the options used to execute prepared query

Yields:

  • will be provided with response

Returns:

  • (self)


1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1438

def execute_prepared_query_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:executePreparedQueryWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::PreparedQueryExecuteOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::PreparedQueryExecuteOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:executePreparedQueryWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::PreparedQueryExecuteOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::PreparedQueryExecuteOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::PreparedQueryExecuteResponse))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling execute_prepared_query_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) failCheck(checkId, resultHandler) { ... }

Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check

Yields:

  • will be called when complete

Returns:

  • (self)


711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 711

def fail_check(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:failCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:failCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling fail_check(#{args[0]})"
  end
end

- (self) failCheckWithNote(checkId, note, resultHandler) { ... }

Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check
  • note (String)
    specifies a human-readable message. This will be passed through to the check's Output field.

Yields:

  • will be called when complete

Returns:

  • (self)


1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1640

def fail_check_with_note(*args)
  if args[0].class == String && args[1].class == String && true
    if (block_given?)
      @j_del.java_method(:failCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:failCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling fail_check_with_note(#{args[0]},#{args[1]})"
  end
end

- (self) fireEvent(name, resultHandler) { ... }

Fires a new user event

Parameters:

  • name (String)
    name of event

Yields:

  • will be provided with properties of event

Returns:

  • (self)


174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 174

def fire_event(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:fireEvent, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:fireEvent, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::Event))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling fire_event(#{args[0]})"
  end
end

- (self) fireEventWithOptions(name, options, resultHandler) { ... }

Fires a new user event

Parameters:

  • name (String)
    name of event
  • options (Hash{String => Object})
    options used to create event

Yields:

  • will be provided with properties of event

Returns:

  • (self)


1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1663

def fire_event_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:fireEventWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::EventOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::EventOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:fireEventWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::EventOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::EventOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::Event))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling fire_event_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) getAllPreparedQueries(resultHandler) { ... }

Returns a list of all prepared queries.

Yields:

  • will be provided with list of definitions of the all prepare queries

Returns:

  • (self)


1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1170

def get_all_prepared_queries
  if true
    if (block_given?)
      @j_del.java_method(:getAllPreparedQueries, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getAllPreparedQueries, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_all_prepared_queries()"
  end
end

- (self) getKeys(keyPrefix, resultHandler) { ... }

Returns the list of keys that corresponding to the specified key prefix.

Parameters:

  • keyPrefix (String)
    the prefix

Yields:

  • will be provided with keys list

Returns:

  • (self)


1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1550

def get_keys(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:getKeys, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getKeys, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_keys(#{args[0]})"
  end
end

- (self) getKeysWithOptions(keyPrefix, options, resultHandler) { ... }

Returns the list of keys that corresponding to the specified key prefix.

Parameters:

  • keyPrefix (String)
    the prefix
  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with keys list

Returns:

  • (self)


951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 951

def get_keys_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:getKeysWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getKeysWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_keys_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) getPreparedQuery(id, resultHandler) { ... }

Returns an existing prepared query

Parameters:

  • id (String)
    the id of the query to read

Yields:

  • will be provided with definition of the prepare query

Returns:

  • (self)


1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1082

def get_prepared_query(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:getPreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getPreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::PreparedQueryDefinition))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_prepared_query(#{args[0]})"
  end
end

- (self) getValue(key, resultHandler) { ... }

Returns key/value pair that corresponding to the specified key. An empty => Object} object will be returned if no such key is found.

Parameters:

  • key (String)
    the key

Yields:

  • will be provided with key/value pair

Returns:

  • (self)


1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1595

def get_value(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:getValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValue))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_value(#{args[0]})"
  end
end

- (self) getValueWithOptions(key, options, resultHandler) { ... }

Returns key/value pair that corresponding to the specified key. An empty => Object} object will be returned if no such key is found. This is blocking query unlike #get_value

Parameters:

  • key (String)
    the key
  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with key/value pair

Returns:

  • (self)


1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1486

def get_value_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:getValueWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getValueWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValue))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_value_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) getValues(keyPrefix, resultHandler) { ... }

Returns the list of key/value pairs that corresponding to the specified key prefix. An empty => Object} object will be returned if no such key prefix is found.

Parameters:

  • keyPrefix (String)
    the prefix

Yields:

  • will be provided with list of key/value pairs

Returns:

  • (self)


1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1392

def get_values(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:getValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValueList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_values(#{args[0]})"
  end
end

- (self) getValuesWithOptions(keyPrefix, options, resultHandler) { ... }

Returns the list of key/value pairs that corresponding to the specified key prefix. An empty => Object} object will be returned if no such key prefix is found. This is blocking query unlike #get_values

Parameters:

  • keyPrefix (String)
    the prefix
  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with list of key/value pairs

Returns:

  • (self)


222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 222

def get_values_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:getValuesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:getValuesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValueList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_values_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) healthChecks(service, resultHandler) { ... }

Returns the checks associated with the service

Parameters:

  • service (String)
    the service name

Yields:

  • will be provided with list of checks

Returns:

  • (self)


62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 62

def health_checks(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:healthChecks, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:healthChecks, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::CheckList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling health_checks(#{args[0]})"
  end
end

- (self) healthChecksWithOptions(service, options, resultHandler) { ... }

Returns the checks associated with the service

Parameters:

  • service (String)
    the service name
  • options (Hash{String => Object})
    options used to request checks

Yields:

  • will be provided with list of checks

Returns:

  • (self)


1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1322

def health_checks_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:healthChecksWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::CheckQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:healthChecksWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::CheckQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::CheckList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling health_checks_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) healthServiceNodes(service, passing, resultHandler) { ... }

Returns the nodes providing the service. This endpoint is very similar to the #catalog_service_nodes endpoint; however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.

Parameters:

  • service (String)
    the service name
  • passing (true, false)
    if true, filter results to only nodes with all checks in the passing state

Yields:

  • will be provided with list of services

Returns:

  • (self)


1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1299

def health_service_nodes(*args)
  if args[0].class == String && (args[1].class == TrueClass || args[1].class == FalseClass) && true
    if (block_given?)
      @j_del.java_method(:healthServiceNodes, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:healthServiceNodes, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceEntryList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling health_service_nodes(#{args[0]},#{args[1]})"
  end
end

- (self) healthServiceNodesWithOptions(service, passing, options, resultHandler) { ... }

Returns the nodes providing the service. This endpoint is very similar to the #catalog_service_nodes_with_options endpoint; however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.

Parameters:

  • service (String)
    the service name
  • passing (true, false)
    if true, filter results to only nodes with all checks in the passing state
  • options (Hash{String => Object})
    options used to request services

Yields:

  • will be provided with list of services

Returns:

  • (self)


1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1347

def health_service_nodes_with_options(*args)
  if args[0].class == String && (args[1].class == TrueClass || args[1].class == FalseClass) && args[2].class == Hash && true
    if (block_given?)
      @j_del.java_method(:healthServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxExtConsul::ServiceQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxExtConsul::ServiceQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:healthServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxExtConsul::ServiceQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxExtConsul::ServiceQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceEntryList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling health_service_nodes_with_options(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) healthState(healthState, resultHandler) { ... }

Returns the checks in the specified status

Parameters:

  • healthState (:PASSING, :WARNING, :CRITICAL, :ANY)
    the health state

Yields:

  • will be provided with list of checks

Returns:

  • (self)


1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1617

def health_state(*args)
  if args[0].class == Symbol && true
    if (block_given?)
      @j_del.java_method(:healthState, [Java::IoVertxExtConsul::HealthState.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::HealthState.valueOf(args[0].to_s),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:healthState, [Java::IoVertxExtConsul::HealthState.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::HealthState.valueOf(args[0].to_s),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::CheckList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling health_state(#{args[0]})"
  end
end

- (self) healthStateWithOptions(healthState, options, resultHandler) { ... }

Returns the checks in the specified status

Parameters:

  • healthState (:PASSING, :WARNING, :CRITICAL, :ANY)
    the health state
  • options (Hash{String => Object})
    options used to request checks

Yields:

  • will be provided with list of checks

Returns:

  • (self)


1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1415

def health_state_with_options(*args)
  if args[0].class == Symbol && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:healthStateWithOptions, [Java::IoVertxExtConsul::HealthState.java_class,Java::IoVertxExtConsul::CheckQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::HealthState.valueOf(args[0].to_s),Java::IoVertxExtConsul::CheckQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:healthStateWithOptions, [Java::IoVertxExtConsul::HealthState.java_class,Java::IoVertxExtConsul::CheckQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::HealthState.valueOf(args[0].to_s),Java::IoVertxExtConsul::CheckQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::CheckList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling health_state_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) infoAclToken(id, tokenHandler) { ... }

Get info of Acl token

Parameters:

  • id (String)
    the ID of token

Yields:

  • will be provided with token

Returns:

  • (self)


689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 689

def info_acl_token(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:infoAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:infoAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::AclToken))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling info_acl_token(#{args[0]})"
  end
end

- (self) infoSession(id, resultHandler) { ... }

Returns the requested session information

Parameters:

  • id (String)
    the ID of requested session

Yields:

  • will be provided with info of requested session

Returns:

  • (self)


863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 863

def info_session(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:infoSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:infoSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::Session))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling info_session(#{args[0]})"
  end
end

- (self) infoSessionWithOptions(id, options, resultHandler) { ... }

Returns the requested session information This is blocking query unlike #info_session

Parameters:

  • id (String)
    the ID of requested session
  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with info of requested session

Returns:

  • (self)


1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1194

def info_session_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:infoSessionWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:infoSessionWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::Session))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling info_session_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) leaderStatus(resultHandler) { ... }

Get the Raft leader for the datacenter in which the agent is running. It returns an address in format "10.1.10.12:8300"

Yields:

  • will be provided with address of cluster leader

Returns:

  • (self)


341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 341

def leader_status
  if true
    if (block_given?)
      @j_del.java_method(:leaderStatus, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:leaderStatus, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling leader_status()"
  end
end

- (self) listAclTokens(resultHandler) { ... }

Get list of Acl token

Yields:

  • will be provided with list of tokens

Returns:

  • (self)


532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 532

def list_acl_tokens
  if true
    if (block_given?)
      @j_del.java_method(:listAclTokens, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:listAclTokens, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling list_acl_tokens()"
  end
end

- (self) listEvents(resultHandler) { ... }

Returns the most recent events known by the agent

Yields:

  • will be provided with list of events

Returns:

  • (self)


511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 511

def list_events
  if true
    if (block_given?)
      @j_del.java_method(:listEvents, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:listEvents, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::EventList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling list_events()"
  end
end

- (self) listEventsWithOptions(options, resultHandler) { ... }

Returns the most recent events known by the agent. This is blocking query unlike #list_events. However, the semantics of this endpoint are slightly different. Most blocking queries provide a monotonic index and block until a newer index is available. This can be supported as a consequence of the total ordering of the consensus protocol. With gossip, there is no ordering, and instead X-Consul-Index maps to the newest event that matches the query.

In practice, this means the index is only useful when used against a single agent and has no meaning globally. Because Consul defines the index as being opaque, clients should not be expecting a natural ordering either.

Parameters:

  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with list of events

Returns:

  • (self)


273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 273

def list_events_with_options(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:listEventsWithOptions, [Java::IoVertxExtConsul::EventListOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::EventListOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:listEventsWithOptions, [Java::IoVertxExtConsul::EventListOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::EventListOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::EventList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling list_events_with_options(#{args[0]})"
  end
end

- (self) listNodeSessions(nodeId, resultHandler) { ... }

Returns the active sessions for a given node

Parameters:

  • nodeId (String)
    the ID of node

Yields:

  • will be provided with list of sessions

Returns:

  • (self)


1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1369

def list_node_sessions(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:listNodeSessions, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:listNodeSessions, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::SessionList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling list_node_sessions(#{args[0]})"
  end
end

- (self) listNodeSessionsWithOptions(nodeId, options, resultHandler) { ... }

Returns the active sessions for a given node This is blocking query unlike #list_node_sessions

Parameters:

  • nodeId (String)
    the ID of node
  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with list of sessions

Returns:

  • (self)


1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1218

def list_node_sessions_with_options(*args)
  if args[0].class == String && args[1].class == Hash && true
    if (block_given?)
      @j_del.java_method(:listNodeSessionsWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:listNodeSessionsWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::SessionList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling list_node_sessions_with_options(#{args[0]},#{args[1]})"
  end
end

- (self) listSessions(resultHandler) { ... }

Returns the active sessions

Yields:

  • will be provided with list of sessions

Returns:

  • (self)


83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 83

def list_sessions
  if true
    if (block_given?)
      @j_del.java_method(:listSessions, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:listSessions, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::SessionList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling list_sessions()"
  end
end

- (self) listSessionsWithOptions(options, resultHandler) { ... }

Returns the active sessions This is blocking query unlike #list_sessions

Parameters:

  • options (Hash{String => Object})
    the blocking options

Yields:

  • will be provided with list of sessions

Returns:

  • (self)


1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1126

def list_sessions_with_options(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:listSessionsWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:listSessionsWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::SessionList))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling list_sessions_with_options(#{args[0]})"
  end
end

- (self) localChecks(resultHandler) { ... }

Return all the checks that are registered with the local agent.

Yields:

  • will be provided with list of checks

Returns:

  • (self)


993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 993

def local_checks
  if true
    if (block_given?)
      @j_del.java_method(:localChecks, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:localChecks, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling local_checks()"
  end
end

- (self) localServices(resultHandler) { ... }

Returns list of services registered with the local agent.

Yields:

  • will be provided with list of services

Returns:

  • (self)


1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1507

def local_services
  if true
    if (block_given?)
      @j_del.java_method(:localServices, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:localServices, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling local_services()"
  end
end

- (self) maintenanceService(maintenanceOptions, resultHandler) { ... }

Places a given service into "maintenance mode"

Parameters:

  • maintenanceOptions (Hash{String => Object})
    the maintenance options

Yields:

  • will be called when complete

Returns:

  • (self)


820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 820

def maintenance_service(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:maintenanceService, [Java::IoVertxExtConsul::MaintenanceOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::MaintenanceOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:maintenanceService, [Java::IoVertxExtConsul::MaintenanceOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::MaintenanceOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling maintenance_service(#{args[0]})"
  end
end

- (self) passCheck(checkId, resultHandler) { ... }

Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check

Yields:

  • will be called when complete

Returns:

  • (self)


733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 733

def pass_check(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:passCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:passCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling pass_check(#{args[0]})"
  end
end

- (self) passCheckWithNote(checkId, note, resultHandler) { ... }

Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check
  • note (String)
    specifies a human-readable message. This will be passed through to the check's Output field.

Yields:

  • will be called when complete

Returns:

  • (self)


1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1060

def pass_check_with_note(*args)
  if args[0].class == String && args[1].class == String && true
    if (block_given?)
      @j_del.java_method(:passCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:passCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling pass_check_with_note(#{args[0]},#{args[1]})"
  end
end

- (self) peersStatus(resultHandler) { ... }

Retrieves the Raft peers for the datacenter in which the the agent is running. It returns a list of addresses "10.1.10.12:8300", "10.1.10.13:8300"

Yields:

  • will be provided with list of peers

Returns:

  • (self)


1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1015

def peers_status
  if true
    if (block_given?)
      @j_del.java_method(:peersStatus, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:peersStatus, [Java::IoVertxCore::Handler.java_class]).call(block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling peers_status()"
  end
end

- (self) putValue(key, value, resultHandler) { ... }

Adds specified key/value pair

Parameters:

  • key (String)
    the key
  • value (String)
    the value

Yields:

  • will be provided with success of operation

Returns:

  • (self)


756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 756

def put_value(*args)
  if args[0].class == String && args[1].class == String && true
    if (block_given?)
      @j_del.java_method(:putValue, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:putValue, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling put_value(#{args[0]},#{args[1]})"
  end
end

- (self) putValueWithOptions(key, value, options, resultHandler) { ... }

Parameters:

  • key (String)
    the key
  • value (String)
    the value
  • options (Hash{String => Object})
    options used to push pair

Yields:

  • will be provided with success of operation

Returns:

  • (self)


197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 197

def put_value_with_options(*args)
  if args[0].class == String && args[1].class == String && args[2].class == Hash && true
    if (block_given?)
      @j_del.java_method(:putValueWithOptions, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxExtConsul::KeyValueOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxExtConsul::KeyValueOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:putValueWithOptions, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxExtConsul::KeyValueOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxExtConsul::KeyValueOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling put_value_with_options(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) registerCheck(checkOptions, resultHandler) { ... }

Add a new check to the local agent. The agent is responsible for managing the status of the check and keeping the Catalog in sync.

Parameters:

  • checkOptions (Hash{String => Object})
    options used to register new check

Yields:

  • will be called when complete

Returns:

  • (self)


667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 667

def register_check(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:registerCheck, [Java::IoVertxExtConsul::CheckOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::CheckOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:registerCheck, [Java::IoVertxExtConsul::CheckOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::CheckOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling register_check(#{args[0]})"
  end
end

- (self) registerService(serviceOptions, resultHandler) { ... }

Adds a new service, with an optional health check, to the local agent.

Parameters:

  • serviceOptions (Hash{String => Object})
    the options of new service

Yields:

  • will be called when complete

Returns:

  • (self)


129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 129

def register_service(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:registerService, [Java::IoVertxExtConsul::ServiceOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::ServiceOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:registerService, [Java::IoVertxExtConsul::ServiceOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::ServiceOptions.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling register_service(#{args[0]})"
  end
end

- (self) renewSession(id, resultHandler) { ... }

Renews the given session. This is used with sessions that have a TTL, and it extends the expiration by the TTL

Parameters:

  • id (String)
    the ID of session that should be renewed

Yields:

  • will be provided with info of renewed session

Returns:

  • (self)


1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1037

def renew_session(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:renewSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:renewSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::Session))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling renew_session(#{args[0]})"
  end
end

- (self) transaction(request, resultHandler) { ... }

Manages multiple operations inside a single, atomic transaction.

Parameters:

  • request (Hash{String => Object})
    transaction request

Yields:

  • will be provided with result of transaction

Returns:

  • (self)


1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1708

def transaction(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:transaction, [Java::IoVertxExtConsul::TxnRequest.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::TxnRequest.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:transaction, [Java::IoVertxExtConsul::TxnRequest.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::TxnRequest.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::TxnResponse))
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling transaction(#{args[0]})"
  end
end

- (self) updateAclToken(token, idHandler) { ... }

Update Acl token

Parameters:

  • token (Hash{String => Object})
    properties of the token to be updated

Yields:

  • will be provided with ID of updated

Returns:

  • (self)


644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 644

def update_acl_token(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:updateAclToken, [Java::IoVertxExtConsul::AclToken.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::AclToken.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:updateAclToken, [Java::IoVertxExtConsul::AclToken.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::AclToken.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling update_acl_token(#{args[0]})"
  end
end

- (self) updateCheck(checkId, status, resultHandler) { ... }

Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check
  • status (:PASSING, :WARNING, :CRITICAL)
    new status of check

Yields:

  • will be called when complete

Returns:

  • (self)


1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 1686

def update_check(*args)
  if args[0].class == String && args[1].class == Symbol && true
    if (block_given?)
      @j_del.java_method(:updateCheck, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckStatus.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::CheckStatus.valueOf(args[1].to_s),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:updateCheck, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckStatus.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::CheckStatus.valueOf(args[1].to_s),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling update_check(#{args[0]},#{args[1]})"
  end
end

- (self) updateCheckWithNote(checkId, status, note, resultHandler) { ... }

Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check
  • status (:PASSING, :WARNING, :CRITICAL)
    new status of check
  • note (String)
    specifies a human-readable message. This will be passed through to the check's Output field.

Yields:

  • will be called when complete

Returns:

  • (self)


107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 107

def update_check_with_note(*args)
  if args[0].class == String && args[1].class == Symbol && args[2].class == String && true
    if (block_given?)
      @j_del.java_method(:updateCheckWithNote, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckStatus.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::CheckStatus.valueOf(args[1].to_s),args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:updateCheckWithNote, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckStatus.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],Java::IoVertxExtConsul::CheckStatus.valueOf(args[1].to_s),args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling update_check_with_note(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) updatePreparedQuery(definition, resultHandler) { ... }

Parameters:

  • definition (Hash{String => Object})
    definition of the prepare query

Yields:

  • will be called when complete

Returns:

  • (self)


841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 841

def update_prepared_query(*args)
  if args[0].class == Hash && true
    if (block_given?)
      @j_del.java_method(:updatePreparedQuery, [Java::IoVertxExtConsul::PreparedQueryDefinition.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::PreparedQueryDefinition.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:updatePreparedQuery, [Java::IoVertxExtConsul::PreparedQueryDefinition.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::PreparedQueryDefinition.new(::Vertx::Util::Utils.to_json_object(args[0])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling update_prepared_query(#{args[0]})"
  end
end

- (self) warnCheck(checkId, resultHandler) { ... }

Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check

Yields:

  • will be called when complete

Returns:

  • (self)


424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 424

def warn_check(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:warnCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:warnCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling warn_check(#{args[0]})"
  end
end

- (self) warnCheckWithNote(checkId, note, resultHandler) { ... }

Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.

Parameters:

  • checkId (String)
    the ID of check
  • note (String)
    specifies a human-readable message. This will be passed through to the check's Output field.

Yields:

  • will be called when complete

Returns:

  • (self)


622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 622

def warn_check_with_note(*args)
  if args[0].class == String && args[1].class == String && true
    if (block_given?)
      @j_del.java_method(:warnCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:warnCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling warn_check_with_note(#{args[0]},#{args[1]})"
  end
end