Class List Method List File List

# Class: VertxConsul::ConsulClient

Inherits:
  Object
  - Object
  - VertxConsul::ConsulClient
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/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)

- + (Boolean) accept?(obj)
- + (::VertxConsul::ConsulClient) create(vertx = nil, options = nil)
  Create a Consul client.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Instance Method Summary (collapse)

- - (self) agent_info { ... }
  Returns the configuration and member information of the local agent.
- - (self) catalog_datacenters { ... }
  Return all the datacenters that are known by the Consul server.
- - (self) catalog_node_services(node = nil) { ... }
  Returns the node's registered services.
- - (self) catalog_node_services_with_options(node = nil, options = nil) { ... }
  Returns the node's registered services This is blocking query unlike #catalog_node_services.
- - (self) catalog_nodes { ... }
  Returns the nodes registered in a datacenter.
- - (self) catalog_nodes_with_options(options = nil) { ... }
  Returns the nodes registered in a datacenter.
- - (self) catalog_service_nodes(service = nil) { ... }
  Returns the nodes providing a service.
- - (self) catalog_service_nodes_with_options(service = nil, options = nil) { ... }
  Returns the nodes providing a service.
- - (self) catalog_services { ... }
  Returns the services registered in a datacenter.
- - (self) catalog_services_with_options(options = nil) { ... }
  Returns the services registered in a datacenter This is blocking query unlike #catalog_services.
- - (self) clone_acl_token(id = nil) { ... }
  Clone Acl token.
- - (void) close
  Close the client and release its resources.
- - (self) coordinate_datacenters { ... }
  Returns the WAN network coordinates for all Consul servers, organized by DCs.
- - (self) coordinate_nodes { ... }
  Returns the LAN network coordinates for all nodes in a given DC.
- - (self) coordinate_nodes_with_options(options = nil) { ... }
  Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlike #coordinate_nodes.
- - (self) create_acl_token(token = nil) { ... }
  Create new Acl token.
- - (self) create_session { ... }
  Initialize a new session.
- - (self) create_session_with_options(options = nil) { ... }
  Initialize a new session.
- - (self) delete_value(key = nil) { ... }
  Remove the key/value pair that corresponding to the specified key.
- - (self) delete_values(keyPrefix = nil) { ... }
  Removes all the key/value pair that corresponding to the specified key prefix.
- - (self) deregister_check(checkId = nil) { ... }
  Remove a check from the local agent.
- - (self) deregister_service(id = nil) { ... }
  Remove a service from the local agent.
- - (self) destroy_acl_token(id = nil) { ... }
  Destroy Acl token.
- - (self) destroy_session(id = nil) { ... }
  Destroys the given session.
- - (self) fail_check(checkId = nil) { ... }
  Set status of the check to "critical".
- - (self) fail_check_with_note(checkId = nil, note = nil) { ... }
  Set status of the check to "critical".
- - (self) fire_event(name = nil) { ... }
  Fires a new user event.
- - (self) fire_event_with_options(name = nil, options = nil) { ... }
  Fires a new user event.
- - (self) get_value(key = nil) { ... }
  Returns key/value pair that corresponding to the specified key.
- - (self) get_value_with_options(key = nil, options = nil) { ... }
  Returns key/value pair that corresponding to the specified key.
- - (self) get_values(keyPrefix = nil) { ... }
  Returns the list of key/value pairs that corresponding to the specified key prefix.
- - (self) get_values_with_options(keyPrefix = nil, options = nil) { ... }
  Returns the list of key/value pairs that corresponding to the specified key prefix.
- - (self) health_service_nodes(service = nil, passing = nil) { ... }
  Returns the nodes providing the service.
- - (self) health_service_nodes_with_options(service = nil, passing = nil, options = nil) { ... }
  Returns the nodes providing the service.
- - (self) info_acl_token(id = nil) { ... }
  Get info of Acl token.
- - (self) info_session(id = nil) { ... }
  Returns the requested session information.
- - (self) info_session_with_options(id = nil, options = nil) { ... }
  Returns the requested session information This is blocking query unlike #info_session.
- - (self) leader_status { ... }
  Get the Raft leader for the datacenter in which the agent is running.
- - (self) list_acl_tokens { ... }
  Get list of Acl token.
- - (self) list_events { ... }
  Returns the most recent events known by the agent.
- - (self) list_events_with_options(options = nil) { ... }
  Returns the most recent events known by the agent.
- - (self) list_node_sessions(nodeId = nil) { ... }
  Returns the active sessions for a given node.
- - (self) list_node_sessions_with_options(nodeId = nil, options = nil) { ... }
  Returns the active sessions for a given node This is blocking query unlike #list_node_sessions.
- - (self) list_sessions { ... }
  Returns the active sessions.
- - (self) list_sessions_with_options(options = nil) { ... }
  Returns the active sessions This is blocking query unlike #list_sessions.
- - (self) local_checks { ... }
  Return all the checks that are registered with the local agent.
- - (self) local_services { ... }
  Returns list of services registered with the local agent.
- - (self) maintenance_service(maintenanceOptions = nil) { ... }
  Places a given service into "maintenance mode".
- - (self) pass_check(checkId = nil) { ... }
  Set status of the check to "passing".
- - (self) pass_check_with_note(checkId = nil, note = nil) { ... }
  Set status of the check to "passing".
- - (self) peers_status { ... }
  Retrieves the Raft peers for the datacenter in which the the agent is running.
- - (self) put_value(key = nil, value = nil) { ... }
  Adds specified key/value pair.
- - (self) put_value_with_options(key = nil, value = nil, options = nil) { ... }
- - (self) register_check(checkOptions = nil) { ... }
  Add a new check to the local agent.
- - (self) register_service(serviceOptions = nil) { ... }
  Adds a new service, with an optional health check, to the local agent.
- - (self) renew_session(id = nil) { ... }
  Renews the given session.
- - (self) transaction(request = nil) { ... }
  Manages multiple operations inside a single, atomic transaction.
- - (self) update_acl_token(token = nil) { ... }
  Update Acl token.
- - (self) update_check(checkId = nil, status = nil) { ... }
  Set status of the check to given status.
- - (self) update_check_with_note(checkId = nil, status = nil, note = nil) { ... }
  Set status of the check to given status.
- - (self) warn_check(checkId = nil) { ... }
  Set status of the check to "warning".
- - (self) warn_check_with_note(checkId = nil, note = nil) { ... }
  Set status of the check to "warning".

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    18
    19
    20
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 18

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

### + (`::VertxConsul::ConsulClient`) create(vertx = nil, options = nil)

Create a Consul client.

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`) —
  the Vert.x instance
- options (`Hash`) (defaults to: `nil`) —
  the options

Returns:

- (`::VertxConsul::ConsulClient`) —
  the client

Raises:

- (`ArgumentError`)

    37
    38
    39
    40
    41
    42
    43
    44
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 37

    def self.create(vertx=nil,options=nil)
      if vertx.class.method_defined?(:j_del) && !block_given? && options == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::ConsulClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxConsul::ConsulClient)
      elsif vertx.class.method_defined?(:j_del) && options.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(vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxConsul::ConsulClient)
      end
      raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{options})"
    end

### + (`Object`) j_api_type

    27
    28
    29
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 27

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    30
    31
    32
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 30

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

### + (`Object`) unwrap(obj)

    24
    25
    26
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 24

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

### + (`Object`) wrap(obj)

    21
    22
    23
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 21

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

## Instance Method Details

### - (`self`) agent_info { ... }

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`)

Raises:

- (`ArgumentError`)

    48
    49
    50
    51
    52
    53
    54
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 48

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

### - (`self`) catalog_datacenters { ... }

Return all the datacenters that are known by the Consul server

Yields:

- will be provided with list of datacenters

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    368
    369
    370
    371
    372
    373
    374
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 368

    def catalog_datacenters
      if block_given?
        @j_del.java_method(:catalogDatacenters, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_datacenters()"
    end

### - (`self`) catalog_node_services(node = nil) { ... }

Returns the node's registered services

Parameters:

- node (`String`) (defaults to: `nil`) —
  node name

Yields:

- will be provided with list of services

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    449
    450
    451
    452
    453
    454
    455
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 449

    def catalog_node_services(node=nil)
      if node.class == String && block_given?
        @j_del.java_method(:catalogNodeServices, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(node,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_node_services(#{node})"
    end

### - (`self`) catalog_node_services_with_options(node = nil, options = nil) { ... }

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

Parameters:

- node (`String`) (defaults to: `nil`) —
  node name
- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with list of services

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    462
    463
    464
    465
    466
    467
    468
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 462

    def catalog_node_services_with_options(node=nil,options=nil)
      if node.class == String && options.class == Hash && block_given?
        @j_del.java_method(:catalogNodeServicesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(node,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_node_services_with_options(#{node},#{options})"
    end

### - (`self`) catalog_nodes { ... }

Returns the nodes registered in a datacenter

Yields:

- will be provided with list of nodes

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    378
    379
    380
    381
    382
    383
    384
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 378

    def catalog_nodes
      if block_given?
        @j_del.java_method(:catalogNodes, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_nodes()"
    end

### - (`self`) catalog_nodes_with_options(options = nil) { ... }

Returns the nodes registered in a datacenter

Parameters:

- options (`Hash`) (defaults to: `nil`) —
  options used to request nodes

Yields:

- will be provided with list of nodes

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    389
    390
    391
    392
    393
    394
    395
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 389

    def catalog_nodes_with_options(options=nil)
      if options.class == Hash && 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(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_nodes_with_options(#{options})"
    end

### - (`self`) catalog_service_nodes(service = nil) { ... }

Returns the nodes providing a service

Parameters:

- service (`String`) (defaults to: `nil`) —
  name of service

Yields:

- will be provided with list of nodes providing given service

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    346
    347
    348
    349
    350
    351
    352
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 346

    def catalog_service_nodes(service=nil)
      if service.class == String && block_given?
        @j_del.java_method(:catalogServiceNodes, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(service,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_service_nodes(#{service})"
    end

### - (`self`) catalog_service_nodes_with_options(service = nil, options = nil) { ... }

Returns the nodes providing a service

Parameters:

- service (`String`) (defaults to: `nil`) —
  name of service
- options (`Hash`) (defaults to: `nil`) —
  options used to request services

Yields:

- will be provided with list of nodes providing given service

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    358
    359
    360
    361
    362
    363
    364
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 358

    def catalog_service_nodes_with_options(service=nil,options=nil)
      if service.class == String && options.class == Hash && block_given?
        @j_del.java_method(:catalogServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::ServiceQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(service,Java::IoVertxExtConsul::ServiceQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_service_nodes_with_options(#{service},#{options})"
    end

### - (`self`) catalog_services { ... }

Returns the services registered in a datacenter

Yields:

- will be provided with list of services

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    426
    427
    428
    429
    430
    431
    432
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 426

    def catalog_services
      if block_given?
        @j_del.java_method(:catalogServices, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_services()"
    end

### - (`self`) catalog_services_with_options(options = nil) { ... }

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

Parameters:

- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with list of services

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    438
    439
    440
    441
    442
    443
    444
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 438

    def catalog_services_with_options(options=nil)
      if options.class == Hash && 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(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling catalog_services_with_options(#{options})"
    end

### - (`self`) clone_acl_token(id = nil) { ... }

Clone Acl token

Parameters:

- id (`String`) (defaults to: `nil`) —
  the ID of token to be cloned

Yields:

- will be provided with ID of cloned token

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    218
    219
    220
    221
    222
    223
    224
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 218

    def clone_acl_token(id=nil)
      if id.class == String && block_given?
        @j_del.java_method(:cloneAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling clone_acl_token(#{id})"
    end

### - (`void`) close

This method returns an undefined value.

Close the client and release its resources

Raises:

- (`ArgumentError`)

    743
    744
    745
    746
    747
    748
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 743

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

### - (`self`) coordinate_datacenters { ... }

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`)

Raises:

- (`ArgumentError`)

    80
    81
    82
    83
    84
    85
    86
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 80

    def coordinate_datacenters
      if block_given?
        @j_del.java_method(:coordinateDatacenters, [Java::IoVertxCore::Handler.java_class]).call((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) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling coordinate_datacenters()"
    end

### - (`self`) coordinate_nodes { ... }

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`)

Raises:

- (`ArgumentError`)

    58
    59
    60
    61
    62
    63
    64
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 58

    def coordinate_nodes
      if block_given?
        @j_del.java_method(:coordinateNodes, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling coordinate_nodes()"
    end

### - (`self`) coordinate_nodes_with_options(options = nil) { ... }

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

Parameters:

- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with network coordinates of nodes in datacenter

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    70
    71
    72
    73
    74
    75
    76
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 70

    def coordinate_nodes_with_options(options=nil)
      if options.class == Hash && 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(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling coordinate_nodes_with_options(#{options})"
    end

### - (`self`) create_acl_token(token = nil) { ... }

Create new Acl token

Parameters:

- token (`Hash`) (defaults to: `nil`) —
  properties of the token

Yields:

- will be provided with ID of created token

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    196
    197
    198
    199
    200
    201
    202
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 196

    def create_acl_token(token=nil)
      if token.class == Hash && 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(token)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling create_acl_token(#{token})"
    end

### - (`self`) create_session { ... }

Initialize a new session

Yields:

- will be provided with ID of new session

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    631
    632
    633
    634
    635
    636
    637
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 631

    def create_session
      if block_given?
        @j_del.java_method(:createSession, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling create_session()"
    end

### - (`self`) create_session_with_options(options = nil) { ... }

Initialize a new session

Parameters:

- options (`Hash`) (defaults to: `nil`) —
  options used to create session

Yields:

- will be provided with ID of new session

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    642
    643
    644
    645
    646
    647
    648
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 642

    def create_session_with_options(options=nil)
      if options.class == Hash && 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(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling create_session_with_options(#{options})"
    end

### - (`self`) delete_value(key = nil) { ... }

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

Parameters:

- key (`String`) (defaults to: `nil`) —
  the key

Yields:

- will be called on complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    115
    116
    117
    118
    119
    120
    121
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 115

    def delete_value(key=nil)
      if key.class == String && block_given?
        @j_del.java_method(:deleteValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(key,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling delete_value(#{key})"
    end

### - (`self`) delete_values(keyPrefix = nil) { ... }

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

Parameters:

- keyPrefix (`String`) (defaults to: `nil`) —
  the prefix

Yields:

- will be called on complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    150
    151
    152
    153
    154
    155
    156
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 150

    def delete_values(keyPrefix=nil)
      if keyPrefix.class == String && block_given?
        @j_del.java_method(:deleteValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling delete_values(#{keyPrefix})"
    end

### - (`self`) deregister_check(checkId = nil) { ... }

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

Parameters:

- checkId (`String`) (defaults to: `nil`) —
  the ID of check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    505
    506
    507
    508
    509
    510
    511
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 505

    def deregister_check(checkId=nil)
      if checkId.class == String && block_given?
        @j_del.java_method(:deregisterCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling deregister_check(#{checkId})"
    end

### - (`self`) deregister_service(id = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of service

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    335
    336
    337
    338
    339
    340
    341
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 335

    def deregister_service(id=nil)
      if id.class == String && block_given?
        @j_del.java_method(:deregisterService, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling deregister_service(#{id})"
    end

### - (`self`) destroy_acl_token(id = nil) { ... }

Destroy Acl token

Parameters:

- id (`String`) (defaults to: `nil`) —
  the ID of token

Yields:

- will be called on complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    250
    251
    252
    253
    254
    255
    256
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 250

    def destroy_acl_token(id=nil)
      if id.class == String && block_given?
        @j_del.java_method(:destroyAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling destroy_acl_token(#{id})"
    end

### - (`self`) destroy_session(id = nil) { ... }

Destroys the given session

Parameters:

- id (`String`) (defaults to: `nil`) —
  the ID of session

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    734
    735
    736
    737
    738
    739
    740
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 734

    def destroy_session(id=nil)
      if id.class == String && block_given?
        @j_del.java_method(:destroySession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling destroy_session(#{id})"
    end

### - (`self`) fail_check(checkId = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    562
    563
    564
    565
    566
    567
    568
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 562

    def fail_check(checkId=nil)
      if checkId.class == String && block_given?
        @j_del.java_method(:failCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling fail_check(#{checkId})"
    end

### - (`self`) fail_check_with_note(checkId = nil, note = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check
- note (`String`) (defaults to: `nil`) —
  a human-readable message with the status of the check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    574
    575
    576
    577
    578
    579
    580
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 574

    def fail_check_with_note(checkId=nil,note=nil)
      if checkId.class == String && note.class == String && 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(checkId,note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling fail_check_with_note(#{checkId},#{note})"
    end

### - (`self`) fire_event(name = nil) { ... }

Fires a new user event

Parameters:

- name (`String`) (defaults to: `nil`) —
  name of event

Yields:

- will be provided with properties of event

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    261
    262
    263
    264
    265
    266
    267
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 261

    def fire_event(name=nil)
      if name.class == String && block_given?
        @j_del.java_method(:fireEvent, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling fire_event(#{name})"
    end

### - (`self`) fire_event_with_options(name = nil, options = nil) { ... }

Fires a new user event

Parameters:

- name (`String`) (defaults to: `nil`) —
  name of event
- options (`Hash`) (defaults to: `nil`) —
  options used to create event

Yields:

- will be provided with properties of event

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    273
    274
    275
    276
    277
    278
    279
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 273

    def fire_event_with_options(name=nil,options=nil)
      if name.class == String && options.class == Hash && block_given?
        @j_del.java_method(:fireEventWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::EventOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(name,Java::IoVertxExtConsul::EventOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling fire_event_with_options(#{name},#{options})"
    end

### - (`self`) get_value(key = nil) { ... }

Returns key/value pair that corresponding to the specified key

Parameters:

- key (`String`) (defaults to: `nil`) —
  the key

Yields:

- will be provided with key/value pair

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    91
    92
    93
    94
    95
    96
    97
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 91

    def get_value(key=nil)
      if key.class == String && block_given?
        @j_del.java_method(:getValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(key,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling get_value(#{key})"
    end

### - (`self`) get_value_with_options(key = nil, options = nil) { ... }

Returns key/value pair that corresponding to the specified key. This is blocking query unlike #get_value

Parameters:

- key (`String`) (defaults to: `nil`) —
  the key
- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with key/value pair

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    104
    105
    106
    107
    108
    109
    110
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 104

    def get_value_with_options(key=nil,options=nil)
      if key.class == String && options.class == Hash && block_given?
        @j_del.java_method(:getValueWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(key,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling get_value_with_options(#{key},#{options})"
    end

### - (`self`) get_values(keyPrefix = nil) { ... }

Returns the list of key/value pairs that corresponding to the specified key prefix.

Parameters:

- keyPrefix (`String`) (defaults to: `nil`) —
  the prefix

Yields:

- will be provided with list of key/value pairs

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    126
    127
    128
    129
    130
    131
    132
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 126

    def get_values(keyPrefix=nil)
      if keyPrefix.class == String && block_given?
        @j_del.java_method(:getValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling get_values(#{keyPrefix})"
    end

### - (`self`) get_values_with_options(keyPrefix = nil, options = nil) { ... }

Returns the list of key/value pairs that corresponding to the specified key prefix. This is blocking query unlike #get_values

Parameters:

- keyPrefix (`String`) (defaults to: `nil`) —
  the prefix
- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with list of key/value pairs

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    139
    140
    141
    142
    143
    144
    145
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 139

    def get_values_with_options(keyPrefix=nil,options=nil)
      if keyPrefix.class == String && options.class == Hash && block_given?
        @j_del.java_method(:getValuesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling get_values_with_options(#{keyPrefix},#{options})"
    end

### - (`self`) health_service_nodes(service = nil, passing = nil) { ... }

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`) (defaults to: `nil`) —
  the service name
- passing (`true`, `false`) (defaults to: `nil`) —
  if true, filter results to only nodes with all checks in the passing state

Yields:

- will be provided with list of services

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    402
    403
    404
    405
    406
    407
    408
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 402

    def health_service_nodes(service=nil,passing=nil)
      if service.class == String && (passing.class == TrueClass || passing.class == FalseClass) && block_given?
        @j_del.java_method(:healthServiceNodes, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(service,passing,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling health_service_nodes(#{service},#{passing})"
    end

### - (`self`) health_service_nodes_with_options(service = nil, passing = nil, options = nil) { ... }

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`) (defaults to: `nil`) —
  the service name
- passing (`true`, `false`) (defaults to: `nil`) —
  if true, filter results to only nodes with all checks in the passing state
- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with list of services

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    416
    417
    418
    419
    420
    421
    422
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 416

    def health_service_nodes_with_options(service=nil,passing=nil,options=nil)
      if service.class == String && (passing.class == TrueClass || passing.class == FalseClass) && options.class == Hash && block_given?
        @j_del.java_method(:healthServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(service,passing,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling health_service_nodes_with_options(#{service},#{passing},#{options})"
    end

### - (`self`) info_acl_token(id = nil) { ... }

Get info of Acl token

Parameters:

- id (`String`) (defaults to: `nil`) —
  the ID of token

Yields:

- will be provided with token

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    239
    240
    241
    242
    243
    244
    245
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 239

    def info_acl_token(id=nil)
      if id.class == String && block_given?
        @j_del.java_method(:infoAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling info_acl_token(#{id})"
    end

### - (`self`) info_session(id = nil) { ... }

Returns the requested session information

Parameters:

- id (`String`) (defaults to: `nil`) —
  the ID of requested session

Yields:

- will be provided with info of requested session

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    653
    654
    655
    656
    657
    658
    659
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 653

    def info_session(id=nil)
      if id.class == String && block_given?
        @j_del.java_method(:infoSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling info_session(#{id})"
    end

### - (`self`) info_session_with_options(id = nil, options = nil) { ... }

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

Parameters:

- id (`String`) (defaults to: `nil`) —
  the ID of requested session
- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with info of requested session

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    666
    667
    668
    669
    670
    671
    672
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 666

    def info_session_with_options(id=nil,options=nil)
      if id.class == String && options.class == Hash && block_given?
        @j_del.java_method(:infoSessionWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(id,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling info_session_with_options(#{id},#{options})"
    end

### - (`self`) leader_status { ... }

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`)

Raises:

- (`ArgumentError`)

    610
    611
    612
    613
    614
    615
    616
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 610

    def leader_status
      if block_given?
        @j_del.java_method(:leaderStatus, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling leader_status()"
    end

### - (`self`) list_acl_tokens { ... }

Get list of Acl token

Yields:

- will be provided with list of tokens

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    228
    229
    230
    231
    232
    233
    234
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 228

    def list_acl_tokens
      if block_given?
        @j_del.java_method(:listAclTokens, [Java::IoVertxCore::Handler.java_class]).call((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) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling list_acl_tokens()"
    end

### - (`self`) list_events { ... }

Returns the most recent events known by the agent

Yields:

- will be provided with list of events

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    283
    284
    285
    286
    287
    288
    289
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 283

    def list_events
      if block_given?
        @j_del.java_method(:listEvents, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling list_events()"
    end

### - (`self`) list_events_with_options(options = nil) { ... }

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`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with list of events

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    301
    302
    303
    304
    305
    306
    307
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 301

    def list_events_with_options(options=nil)
      if options.class == Hash && block_given?
        @j_del.java_method(:listEventsWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling list_events_with_options(#{options})"
    end

### - (`self`) list_node_sessions(nodeId = nil) { ... }

Returns the active sessions for a given node

Parameters:

- nodeId (`String`) (defaults to: `nil`) —
  the ID of node

Yields:

- will be provided with list of sessions

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    710
    711
    712
    713
    714
    715
    716
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 710

    def list_node_sessions(nodeId=nil)
      if nodeId.class == String && block_given?
        @j_del.java_method(:listNodeSessions, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(nodeId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling list_node_sessions(#{nodeId})"
    end

### - (`self`) list_node_sessions_with_options(nodeId = nil, options = nil) { ... }

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

Parameters:

- nodeId (`String`) (defaults to: `nil`) —
  the ID of node
- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with list of sessions

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    723
    724
    725
    726
    727
    728
    729
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 723

    def list_node_sessions_with_options(nodeId=nil,options=nil)
      if nodeId.class == String && options.class == Hash && block_given?
        @j_del.java_method(:listNodeSessionsWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(nodeId,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling list_node_sessions_with_options(#{nodeId},#{options})"
    end

### - (`self`) list_sessions { ... }

Returns the active sessions

Yields:

- will be provided with list of sessions

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    687
    688
    689
    690
    691
    692
    693
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 687

    def list_sessions
      if block_given?
        @j_del.java_method(:listSessions, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling list_sessions()"
    end

### - (`self`) list_sessions_with_options(options = nil) { ... }

Returns the active sessions This is blocking query unlike #list_sessions

Parameters:

- options (`Hash`) (defaults to: `nil`) —
  the blocking options

Yields:

- will be provided with list of sessions

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    699
    700
    701
    702
    703
    704
    705
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 699

    def list_sessions_with_options(options=nil)
      if options.class == Hash && 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(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling list_sessions_with_options(#{options})"
    end

### - (`self`) local_checks { ... }

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

Yields:

- will be provided with list of checks

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    482
    483
    484
    485
    486
    487
    488
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 482

    def local_checks
      if block_given?
        @j_del.java_method(:localChecks, [Java::IoVertxCore::Handler.java_class]).call((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) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling local_checks()"
    end

### - (`self`) local_services { ... }

Returns list of services registered with the local agent.

Yields:

- will be provided with list of services

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    472
    473
    474
    475
    476
    477
    478
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 472

    def local_services
      if block_given?
        @j_del.java_method(:localServices, [Java::IoVertxCore::Handler.java_class]).call((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) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling local_services()"
    end

### - (`self`) maintenance_service(maintenanceOptions = nil) { ... }

Places a given service into "maintenance mode"

Parameters:

- maintenanceOptions (`Hash`) (defaults to: `nil`) —
  the maintenance options

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    323
    324
    325
    326
    327
    328
    329
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 323

    def maintenance_service(maintenanceOptions=nil)
      if maintenanceOptions.class == Hash && 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(maintenanceOptions)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling maintenance_service(#{maintenanceOptions})"
    end

### - (`self`) pass_check(checkId = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    516
    517
    518
    519
    520
    521
    522
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 516

    def pass_check(checkId=nil)
      if checkId.class == String && block_given?
        @j_del.java_method(:passCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling pass_check(#{checkId})"
    end

### - (`self`) pass_check_with_note(checkId = nil, note = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check
- note (`String`) (defaults to: `nil`) —
  a human-readable message with the status of the check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    528
    529
    530
    531
    532
    533
    534
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 528

    def pass_check_with_note(checkId=nil,note=nil)
      if checkId.class == String && note.class == String && 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(checkId,note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling pass_check_with_note(#{checkId},#{note})"
    end

### - (`self`) peers_status { ... }

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`)

Raises:

- (`ArgumentError`)

    621
    622
    623
    624
    625
    626
    627
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 621

    def peers_status
      if block_given?
        @j_del.java_method(:peersStatus, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling peers_status()"
    end

### - (`self`) put_value(key = nil, value = nil) { ... }

Adds specified key/value pair

Parameters:

- key (`String`) (defaults to: `nil`) —
  the key
- value (`String`) (defaults to: `nil`) —
  the value

Yields:

- will be provided with success of operation

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    162
    163
    164
    165
    166
    167
    168
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 162

    def put_value(key=nil,value=nil)
      if key.class == String && value.class == String && 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(key,value,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling put_value(#{key},#{value})"
    end

### - (`self`) put_value_with_options(key = nil, value = nil, options = nil) { ... }

Parameters:

- key (`String`) (defaults to: `nil`) —
  the key
- value (`String`) (defaults to: `nil`) —
  the value
- options (`Hash`) (defaults to: `nil`) —
  options used to push pair

Yields:

- will be provided with success of operation

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    174
    175
    176
    177
    178
    179
    180
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 174

    def put_value_with_options(key=nil,value=nil,options=nil)
      if key.class == String && value.class == String && options.class == Hash && 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(key,value,Java::IoVertxExtConsul::KeyValueOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling put_value_with_options(#{key},#{value},#{options})"
    end

### - (`self`) register_check(checkOptions = nil) { ... }

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`) (defaults to: `nil`) —
  options used to register new check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    494
    495
    496
    497
    498
    499
    500
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 494

    def register_check(checkOptions=nil)
      if checkOptions.class == Hash && 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(checkOptions)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling register_check(#{checkOptions})"
    end

### - (`self`) register_service(serviceOptions = nil) { ... }

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

Parameters:

- serviceOptions (`Hash`) (defaults to: `nil`) —
  the options of new service

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    312
    313
    314
    315
    316
    317
    318
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 312

    def register_service(serviceOptions=nil)
      if serviceOptions.class == Hash && 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(serviceOptions)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling register_service(#{serviceOptions})"
    end

### - (`self`) renew_session(id = nil) { ... }

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

Parameters:

- id (`String`) (defaults to: `nil`) —
  the ID of session that should be renewed

Yields:

- will be provided with info of renewed session

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    677
    678
    679
    680
    681
    682
    683
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 677

    def renew_session(id=nil)
      if id.class == String && block_given?
        @j_del.java_method(:renewSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling renew_session(#{id})"
    end

### - (`self`) transaction(request = nil) { ... }

Manages multiple operations inside a single, atomic transaction.

Parameters:

- request (`Hash`) (defaults to: `nil`) —
  transaction request

Yields:

- will be provided with result of transaction

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    185
    186
    187
    188
    189
    190
    191
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 185

    def transaction(request=nil)
      if request.class == Hash && 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(request)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling transaction(#{request})"
    end

### - (`self`) update_acl_token(token = nil) { ... }

Update Acl token

Parameters:

- token (`Hash`) (defaults to: `nil`) —
  properties of the token to be updated

Yields:

- will be provided with ID of updated

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    207
    208
    209
    210
    211
    212
    213
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 207

    def update_acl_token(token=nil)
      if token.class == Hash && 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(token)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling update_acl_token(#{token})"
    end

### - (`self`) update_check(checkId = nil, status = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check
- status (`:PASSING`, `:WARNING`, `:CRITICAL`) (defaults to: `nil`) —
  new status of check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    586
    587
    588
    589
    590
    591
    592
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 586

    def update_check(checkId=nil,status=nil)
      if checkId.class == String && status.class == Symbol && block_given?
        @j_del.java_method(:updateCheck, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckStatus.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,Java::IoVertxExtConsul::CheckStatus.valueOf(status.to_s),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling update_check(#{checkId},#{status})"
    end

### - (`self`) update_check_with_note(checkId = nil, status = nil, note = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check
- status (`:PASSING`, `:WARNING`, `:CRITICAL`) (defaults to: `nil`) —
  new status of check
- note (`String`) (defaults to: `nil`) —
  a human-readable message with the status of the check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    599
    600
    601
    602
    603
    604
    605
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 599

    def update_check_with_note(checkId=nil,status=nil,note=nil)
      if checkId.class == String && status.class == Symbol && note.class == String && 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(checkId,Java::IoVertxExtConsul::CheckStatus.valueOf(status.to_s),note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling update_check_with_note(#{checkId},#{status},#{note})"
    end

### - (`self`) warn_check(checkId = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    539
    540
    541
    542
    543
    544
    545
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 539

    def warn_check(checkId=nil)
      if checkId.class == String && block_given?
        @j_del.java_method(:warnCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling warn_check(#{checkId})"
    end

### - (`self`) warn_check_with_note(checkId = nil, note = nil) { ... }

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`) (defaults to: `nil`) —
  the ID of check
- note (`String`) (defaults to: `nil`) —
  a human-readable message with the status of the check

Yields:

- will be called when complete

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    551
    552
    553
    554
    555
    556
    557
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 551

    def warn_check_with_note(checkId=nil,note=nil)
      if checkId.class == String && note.class == String && 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(checkId,note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling warn_check_with_note(#{checkId},#{note})"
    end