Class Watch<T>


  • public class Watch<T>
    extends Object
    Watches are a way of specifying a view of data (e.g. list of nodes, KV pairs, health checks) which is monitored for updates. When an update is detected, an Handler with WatchResult is invoked. All errors, except java.util.concurrent.TimeoutException, will be handled, with resubscribing with a progressive delay. All timeout errors will be ignored, with resubscribing without any delay. As an example, you could watch the status of health checks and notify when a check is critical.

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Field Detail

      • __typeArg_0

        public final TypeArg<T> __typeArg_0
    • Constructor Detail

      • Watch

        public Watch​(io.vertx.ext.consul.Watch delegate)
      • Watch

        public Watch​(io.vertx.ext.consul.Watch delegate,
                     TypeArg<T> typeArg_0)
    • Method Detail

      • getDelegate

        public io.vertx.ext.consul.Watch getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • key

        public static Watch<io.vertx.ext.consul.KeyValue> key​(String key,
                                                              Vertx vertx)
        Parameters:
        key - the key
        vertx - the Vertx instance
        Returns:
        the Watch instance
      • key

        public static Watch<io.vertx.ext.consul.KeyValue> key​(String key,
                                                              Vertx vertx,
                                                              io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        key - the key
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • keyPrefix

        public static Watch<io.vertx.ext.consul.KeyValueList> keyPrefix​(String keyPrefix,
                                                                        Vertx vertx)
        Parameters:
        keyPrefix - the key
        vertx - the Vertx instance
        Returns:
        the Watch instance
      • keyPrefix

        public static Watch<io.vertx.ext.consul.KeyValueList> keyPrefix​(String keyPrefix,
                                                                        Vertx vertx,
                                                                        io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        keyPrefix - the key
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • services

        public static Watch<io.vertx.ext.consul.ServiceList> services​(Vertx vertx)
        Parameters:
        vertx - the Vertx instance
        Returns:
        the Watch instance
      • services

        public static Watch<io.vertx.ext.consul.ServiceList> services​(Vertx vertx,
                                                                      io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • service

        public static Watch<io.vertx.ext.consul.ServiceEntryList> service​(String service,
                                                                          Vertx vertx)
        Parameters:
        service - the service name
        vertx - the Vertx instance
        Returns:
        the Watch instance
      • service

        public static Watch<io.vertx.ext.consul.ServiceEntryList> service​(String service,
                                                                          Vertx vertx,
                                                                          io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        service - the service name
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • events

        public static Watch<io.vertx.ext.consul.EventList> events​(String event,
                                                                  Vertx vertx)
        Parameters:
        event - the event name
        vertx - the Vertx instance
        Returns:
        the Watch instance
      • events

        public static Watch<io.vertx.ext.consul.EventList> events​(String event,
                                                                  Vertx vertx,
                                                                  io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        event - the event name
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • nodes

        public static Watch<io.vertx.ext.consul.NodeList> nodes​(Vertx vertx)
        Parameters:
        vertx - the Vertx instance
        Returns:
        the Watch instance
      • nodes

        public static Watch<io.vertx.ext.consul.NodeList> nodes​(Vertx vertx,
                                                                io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • nodeHealthChecks

        public static Watch<io.vertx.ext.consul.CheckList> nodeHealthChecks​(String node,
                                                                            io.vertx.ext.consul.CheckQueryOptions opt,
                                                                            Vertx vertx,
                                                                            io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        node - node name or ID
        opt - options like namespace, datacenter and filter
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • serviceHealthChecks

        public static Watch<io.vertx.ext.consul.CheckList> serviceHealthChecks​(String service,
                                                                               io.vertx.ext.consul.CheckQueryOptions checkQueryOptions,
                                                                               Vertx vertx,
                                                                               io.vertx.ext.consul.ConsulClientOptions options)
        Parameters:
        service - the service name
        checkQueryOptions - options used to request checks
        vertx - the Vertx instance
        options - the options to create underlying Consul client
        Returns:
        the Watch instance
      • start

        public Watch<T> start()
        Returns:
        reference to this, for fluency
      • stop

        public void stop()
      • newInstance

        public static <T> Watch<T> newInstance​(io.vertx.ext.consul.Watch arg)
      • newInstance

        public static <T> Watch<T> newInstance​(io.vertx.ext.consul.Watch arg,
                                               TypeArg<T> __typeArg_T)