Package io.vertx.mutiny.ext.consul
Class Watch<T>
java.lang.Object
io.vertx.mutiny.ext.consul.Watch<T>
- All Implemented Interfaces:
MutinyDelegate
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 Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Watch<io.vertx.ext.consul.EventList>static Watch<io.vertx.ext.consul.EventList>io.vertx.ext.consul.WatchinthashCode()static Watch<io.vertx.ext.consul.KeyValue>static Watch<io.vertx.ext.consul.KeyValue>static Watch<io.vertx.ext.consul.KeyValueList>static Watch<io.vertx.ext.consul.KeyValueList>static <T> Watch<T>newInstance(io.vertx.ext.consul.Watch arg) static <T> Watch<T>newInstance(io.vertx.ext.consul.Watch arg, TypeArg<T> __typeArg_T) static Watch<io.vertx.ext.consul.CheckList>nodeHealthChecks(String node, io.vertx.ext.consul.CheckQueryOptions opt, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) static Watch<io.vertx.ext.consul.NodeList>static Watch<io.vertx.ext.consul.NodeList>static Watch<io.vertx.ext.consul.ServiceEntryList>static Watch<io.vertx.ext.consul.ServiceEntryList>static Watch<io.vertx.ext.consul.CheckList>serviceHealthChecks(String service, io.vertx.ext.consul.CheckQueryOptions checkQueryOptions, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) static Watch<io.vertx.ext.consul.ServiceList>static Watch<io.vertx.ext.consul.ServiceList>setHandler(Consumer<WatchResult<T>> handler) start()voidstop()toString()
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
Watch
public Watch(io.vertx.ext.consul.Watch delegate) -
Watch
-
Watch
-
-
Method Details
-
getDelegate
public io.vertx.ext.consul.Watch getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
key
- Parameters:
key- the keyvertx- theVertxinstance- Returns:
- the
Watchinstance
-
key
public static Watch<io.vertx.ext.consul.KeyValue> key(String key, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) - Parameters:
key- the keyvertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
keyPrefix
- Parameters:
keyPrefix- the keyvertx- theVertxinstance- Returns:
- the
Watchinstance
-
keyPrefix
public static Watch<io.vertx.ext.consul.KeyValueList> keyPrefix(String keyPrefix, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) - Parameters:
keyPrefix- the keyvertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
services
- Parameters:
vertx- theVertxinstance- Returns:
- the
Watchinstance
-
services
public static Watch<io.vertx.ext.consul.ServiceList> services(Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) - Parameters:
vertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
service
- Parameters:
service- the service namevertx- theVertxinstance- Returns:
- the
Watchinstance
-
service
public static Watch<io.vertx.ext.consul.ServiceEntryList> service(String service, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) - Parameters:
service- the service namevertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
events
- Parameters:
event- the event namevertx- theVertxinstance- Returns:
- the
Watchinstance
-
events
public static Watch<io.vertx.ext.consul.EventList> events(String event, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) - Parameters:
event- the event namevertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
nodes
- Parameters:
vertx- theVertxinstance- Returns:
- the
Watchinstance
-
nodes
public static Watch<io.vertx.ext.consul.NodeList> nodes(Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options) - Parameters:
vertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
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 IDopt- options like namespace, datacenter and filtervertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
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 namecheckQueryOptions- options used to request checksvertx- theVertxinstanceoptions- the options to create underlying Consul client- Returns:
- the
Watchinstance
-
setHandler
- Parameters:
handler- the result handler- Returns:
-
start
- Returns:
- reference to this, for fluency
-
stop
public void stop() -
newInstance
-
newInstance
-