Package io.vertx.mutiny.ext.consul
Class Watch<T>
- java.lang.Object
-
- io.vertx.mutiny.ext.consul.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, anHandler
withWatchResult
is invoked. All errors, exceptjava.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 theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<Watch>
__TYPE_ARG
TypeArg<T>
__typeArg_0
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static Watch<io.vertx.ext.consul.EventList>
events(String event, Vertx vertx)
static Watch<io.vertx.ext.consul.EventList>
events(String event, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options)
io.vertx.ext.consul.Watch
getDelegate()
int
hashCode()
static Watch<io.vertx.ext.consul.KeyValue>
key(String key, Vertx vertx)
static Watch<io.vertx.ext.consul.KeyValue>
key(String key, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options)
static Watch<io.vertx.ext.consul.KeyValueList>
keyPrefix(String keyPrefix, Vertx vertx)
static Watch<io.vertx.ext.consul.KeyValueList>
keyPrefix(String keyPrefix, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options)
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>
nodes(Vertx vertx)
static Watch<io.vertx.ext.consul.NodeList>
nodes(Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options)
static Watch<io.vertx.ext.consul.ServiceEntryList>
service(String service, Vertx vertx)
static Watch<io.vertx.ext.consul.ServiceEntryList>
service(String service, Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options)
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>
services(Vertx vertx)
static Watch<io.vertx.ext.consul.ServiceList>
services(Vertx vertx, io.vertx.ext.consul.ConsulClientOptions options)
Watch<T>
setHandler(Consumer<WatchResult<T>> handler)
Watch<T>
start()
void
stop()
String
toString()
-
-
-
Method Detail
-
getDelegate
public io.vertx.ext.consul.Watch getDelegate()
-
key
public static Watch<io.vertx.ext.consul.KeyValue> key(String key, Vertx vertx)
- Parameters:
key
- the keyvertx
- theVertx
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 keyvertx
- theVertx
instanceoptions
- 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 keyvertx
- theVertx
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 keyvertx
- theVertx
instanceoptions
- 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
- theVertx
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
- theVertx
instanceoptions
- 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 namevertx
- theVertx
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 namevertx
- theVertx
instanceoptions
- 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 namevertx
- theVertx
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 namevertx
- theVertx
instanceoptions
- 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
- theVertx
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
- theVertx
instanceoptions
- 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 IDopt
- options like namespace, datacenter and filtervertx
- theVertx
instanceoptions
- 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 namecheckQueryOptions
- options used to request checksvertx
- theVertx
instanceoptions
- the options to create underlying Consul client- Returns:
- the
Watch
instance
-
setHandler
public Watch<T> setHandler(Consumer<WatchResult<T>> handler)
- Parameters:
handler
- the result handler- Returns:
-
stop
public void stop()
-
newInstance
public static <T> Watch<T> newInstance(io.vertx.ext.consul.Watch arg)
-
-