public interface ConsulClient
Modifier and Type | Method and Description |
---|---|
Future<JsonObject> |
agentInfo()
Like
agentInfo(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
agentInfo(Handler<AsyncResult<JsonObject>> resultHandler)
Returns the configuration and member information of the local agent
|
Future<List<String>> |
catalogDatacenters()
Like
catalogDatacenters(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogDatacenters(Handler<AsyncResult<List<String>>> resultHandler)
Return all the datacenters that are known by the Consul server
|
Future<NodeList> |
catalogNodes()
Like
catalogNodes(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogNodes(Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenter
|
Future<ServiceList> |
catalogNodeServices(String node)
Like
catalogNodeServices(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogNodeServices(String node,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered services
|
Future<ServiceList> |
catalogNodeServicesWithOptions(String node,
BlockingQueryOptions options)
Like
catalogNodeServicesWithOptions(String, BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogNodeServicesWithOptions(String node,
BlockingQueryOptions options,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the node's registered services
This is blocking query unlike
catalogNodeServices(String, Handler) |
Future<NodeList> |
catalogNodesWithOptions(NodeQueryOptions options)
Like
catalogNodesWithOptions(NodeQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogNodesWithOptions(NodeQueryOptions options,
Handler<AsyncResult<NodeList>> resultHandler)
Returns the nodes registered in a datacenter
|
Future<ServiceList> |
catalogServiceNodes(String service)
Like
catalogServiceNodes(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogServiceNodes(String service,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a service
|
Future<ServiceList> |
catalogServiceNodesWithOptions(String service,
ServiceQueryOptions options)
Like
catalogServiceNodesWithOptions(String, ServiceQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogServiceNodesWithOptions(String service,
ServiceQueryOptions options,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the nodes providing a service
|
Future<ServiceList> |
catalogServices()
Like
catalogServices(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogServices(Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenter
|
Future<ServiceList> |
catalogServicesWithOptions(BlockingQueryOptions options)
Like
catalogServicesWithOptions(BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
catalogServicesWithOptions(BlockingQueryOptions options,
Handler<AsyncResult<ServiceList>> resultHandler)
Returns the services registered in a datacenter
This is blocking query unlike
catalogServices(Handler) |
Future<String> |
cloneAclToken(String id)
Deprecated.
|
Future<AclToken> |
cloneAclToken(String accessorId,
CloneAclTokenOptions cloneAclTokenOptions)
Clones an existing ACL token
|
ConsulClient |
cloneAclToken(String accessorId,
CloneAclTokenOptions cloneAclToken,
Handler<AsyncResult<AclToken>> resultHandler)
Clones an existing ACL token
|
ConsulClient |
cloneAclToken(String id,
Handler<AsyncResult<String>> idHandler)
Deprecated.
Use
cloneAclToken(String, CloneAclTokenOptions) instead |
void |
close()
Close the client and release its resources
|
Future<List<DcCoordinates>> |
coordinateDatacenters()
Like
coordinateDatacenters(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
coordinateDatacenters(Handler<AsyncResult<List<DcCoordinates>>> resultHandler)
Returns the WAN network coordinates for all Consul servers, organized by DCs
|
Future<CoordinateList> |
coordinateNodes()
Like
coordinateNodes(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
coordinateNodes(Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DC
|
Future<CoordinateList> |
coordinateNodesWithOptions(BlockingQueryOptions options)
Like
coordinateNodesWithOptions(BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
coordinateNodesWithOptions(BlockingQueryOptions options,
Handler<AsyncResult<CoordinateList>> resultHandler)
Returns the LAN network coordinates for all nodes in a given DC
This is blocking query unlike
coordinateNodes(Handler) |
static ConsulClient |
create(Vertx vertx)
Create a Consul client with default options.
|
static ConsulClient |
create(Vertx vertx,
ConsulClientOptions options)
Create a Consul client.
|
Future<String> |
createAclPolicy(AclPolicy policy)
Creates a new ACL policy
|
ConsulClient |
createAclPolicy(AclPolicy policy,
Handler<AsyncResult<String>> resultHandler)
Creates a new ACL policy
|
Future<AclToken> |
createAclToken(AclToken token)
Create an Acl token
|
Future<String> |
createAclToken(AclToken token)
Deprecated.
|
ConsulClient |
createAclToken(AclToken token,
Handler<AsyncResult<AclToken>> resultHandler)
Create an Acl token
|
ConsulClient |
createAclToken(AclToken token,
Handler<AsyncResult<String>> idHandler)
Deprecated.
|
Future<String> |
createPreparedQuery(PreparedQueryDefinition definition)
Like
createPreparedQuery(PreparedQueryDefinition, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
createPreparedQuery(PreparedQueryDefinition definition,
Handler<AsyncResult<String>> resultHandler) |
Future<String> |
createSession()
Like
createSession(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
createSession(Handler<AsyncResult<String>> idHandler)
Initialize a new session
|
Future<String> |
createSessionWithOptions(SessionOptions options)
Like
createSessionWithOptions(SessionOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
createSessionWithOptions(SessionOptions options,
Handler<AsyncResult<String>> idHandler)
Initialize a new session
|
Future<Boolean> |
deleteAclToken(String accessorId)
Deletes an ACL token
|
ConsulClient |
deleteAclToken(String accessorId,
Handler<AsyncResult<Boolean>> resultHandler)
Deletes an ACL token
|
Future<Boolean> |
deletePolicy(String id)
This endpoint deletes an ACL policy
|
ConsulClient |
deletePolicy(String id,
Handler<AsyncResult<Boolean>> resultHandler)
This endpoint deletes an ACL policy
|
Future<Void> |
deletePreparedQuery(String id)
Like
deletePreparedQuery(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
deletePreparedQuery(String id,
Handler<AsyncResult<Void>> resultHandler)
Deletes an existing prepared query
|
Future<Void> |
deleteValue(String key)
Like
deleteValue(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
deleteValue(String key,
Handler<AsyncResult<Void>> resultHandler)
Remove the key/value pair that corresponding to the specified key
|
Future<Void> |
deleteValues(String keyPrefix)
Like
deleteValues(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
deleteValues(String keyPrefix,
Handler<AsyncResult<Void>> resultHandler)
Removes all the key/value pair that corresponding to the specified key prefix
|
ConsulClient |
deregisterCatalogService(String nodeId,
String serviceId,
Handler<AsyncResult<Void>> resultHandler)
Deregister entities from the node or deregister the node itself.
|
Future<Void> |
deregisterCheck(String checkId)
Like
deregisterCheck(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
deregisterCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Remove a check from the local agent.
|
Future<Void> |
deregisterService(String id)
Like
deregisterService(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
deregisterService(String id,
Handler<AsyncResult<Void>> resultHandler)
Remove a service from the local agent.
|
Future<Void> |
destroyAclToken(String id)
Deprecated.
|
ConsulClient |
destroyAclToken(String id,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
Use
deleteAclToken(String) instead |
Future<Void> |
destroySession(String id)
Like
destroySession(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
destroySession(String id,
Handler<AsyncResult<Void>> resultHandler)
Destroys the given session
|
Future<PreparedQueryExecuteResponse> |
executePreparedQuery(String query)
Like
executePreparedQuery(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
executePreparedQuery(String query,
Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.
|
Future<PreparedQueryExecuteResponse> |
executePreparedQueryWithOptions(String query,
PreparedQueryExecuteOptions options)
Like
executePreparedQueryWithOptions(String, PreparedQueryExecuteOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
executePreparedQueryWithOptions(String query,
PreparedQueryExecuteOptions options,
Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
Executes an existing prepared query.
|
Future<Void> |
failCheck(String checkId)
Like
failCheck(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
failCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical".
|
Future<Void> |
failCheckWithNote(String checkId,
String note)
Like
failCheckWithNote(String, String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
failCheckWithNote(String checkId,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "critical".
|
Future<Event> |
fireEvent(String name)
Like
fireEvent(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
fireEvent(String name,
Handler<AsyncResult<Event>> resultHandler)
Fires a new user event
|
Future<Event> |
fireEventWithOptions(String name,
EventOptions options)
Like
fireEventWithOptions(String, EventOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
fireEventWithOptions(String name,
EventOptions options,
Handler<AsyncResult<Event>> resultHandler)
Fires a new user event
|
Future<List<AclPolicy>> |
getAclPolicies()
This endpoint lists all the ACL policies.
|
ConsulClient |
getAclPolicies(Handler<AsyncResult<List<AclPolicy>>> resultHandler)
This endpoint lists all the ACL policies.
|
Future<List<AclToken>> |
getAclTokens()
Get list of Acl token
|
ConsulClient |
getAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
Get list of Acl token
|
Future<List<PreparedQueryDefinition>> |
getAllPreparedQueries()
Like
getAllPreparedQueries(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getAllPreparedQueries(Handler<AsyncResult<List<PreparedQueryDefinition>>> resultHandler)
Returns a list of all prepared queries.
|
Future<List<String>> |
getKeys(String keyPrefix)
Like
getKeys(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getKeys(String keyPrefix,
Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.
|
Future<List<String>> |
getKeysWithOptions(String keyPrefix,
BlockingQueryOptions options)
Like
getKeysWithOptions(String, BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getKeysWithOptions(String keyPrefix,
BlockingQueryOptions options,
Handler<AsyncResult<List<String>>> resultHandler)
Returns the list of keys that corresponding to the specified key prefix.
|
Future<PreparedQueryDefinition> |
getPreparedQuery(String id)
Like
getPreparedQuery(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getPreparedQuery(String id,
Handler<AsyncResult<PreparedQueryDefinition>> resultHandler)
Returns an existing prepared query
|
Future<KeyValue> |
getValue(String key)
Like
getValue(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getValue(String key,
Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key.
|
Future<KeyValueList> |
getValues(String keyPrefix)
Like
getValues(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getValues(String keyPrefix,
Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
Future<KeyValueList> |
getValuesWithOptions(String keyPrefix,
BlockingQueryOptions options)
Like
getValuesWithOptions(String, BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getValuesWithOptions(String keyPrefix,
BlockingQueryOptions options,
Handler<AsyncResult<KeyValueList>> resultHandler)
Returns the list of key/value pairs that corresponding to the specified key prefix.
|
Future<KeyValue> |
getValueWithOptions(String key,
BlockingQueryOptions options)
Like
getValueWithOptions(String, BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
getValueWithOptions(String key,
BlockingQueryOptions options,
Handler<AsyncResult<KeyValue>> resultHandler)
Returns key/value pair that corresponding to the specified key.
|
Future<CheckList> |
healthChecks(String service)
Like
healthChecks(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
healthChecks(String service,
Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the service
|
Future<CheckList> |
healthChecksWithOptions(String service,
CheckQueryOptions options)
Like
healthChecksWithOptions(String, CheckQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
healthChecksWithOptions(String service,
CheckQueryOptions options,
Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks associated with the service
|
Future<CheckList> |
healthNodesWithOptions(String node,
CheckQueryOptions options)
Like
healthNodesWithOptions(String, CheckQueryOptions, Handler) but returns a Future of the asynchronous result |
ConsulClient |
healthNodesWithOptions(String node,
CheckQueryOptions options,
Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks specific to the node provided on the path.
|
Future<ServiceEntryList> |
healthServiceNodes(String service,
boolean passing)
Like
healthServiceNodes(String, boolean, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
healthServiceNodes(String service,
boolean passing,
Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service.
|
Future<ServiceEntryList> |
healthServiceNodesWithOptions(String service,
boolean passing,
ServiceQueryOptions options)
Like
healthServiceNodesWithOptions(String, boolean, ServiceQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
healthServiceNodesWithOptions(String service,
boolean passing,
ServiceQueryOptions options,
Handler<AsyncResult<ServiceEntryList>> resultHandler)
Returns the nodes providing the service.
|
Future<CheckList> |
healthState(HealthState healthState)
Like
healthState(HealthState, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
healthState(HealthState healthState,
Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks in the specified status
|
Future<CheckList> |
healthStateWithOptions(HealthState healthState,
CheckQueryOptions options)
Like
healthStateWithOptions(HealthState, CheckQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
healthStateWithOptions(HealthState healthState,
CheckQueryOptions options,
Handler<AsyncResult<CheckList>> resultHandler)
Returns the checks in the specified status
|
Future<AclToken> |
infoAclToken(String id)
Deprecated.
|
ConsulClient |
infoAclToken(String id,
Handler<AsyncResult<AclToken>> tokenHandler)
Deprecated.
Use
readAclToken(String) instead |
Future<Session> |
infoSession(String id)
Like
infoSession(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
infoSession(String id,
Handler<AsyncResult<Session>> resultHandler)
Returns the requested session information
|
Future<Session> |
infoSessionWithOptions(String id,
BlockingQueryOptions options)
Like
infoSessionWithOptions(String, BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
infoSessionWithOptions(String id,
BlockingQueryOptions options,
Handler<AsyncResult<Session>> resultHandler)
Returns the requested session information
This is blocking query unlike
infoSession(String, Handler) |
Future<String> |
leaderStatus()
Like
leaderStatus(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
leaderStatus(Handler<AsyncResult<String>> resultHandler)
Get the Raft leader for the datacenter in which the agent is running.
|
Future<List<AclToken>> |
listAclTokens()
Deprecated.
|
ConsulClient |
listAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
Deprecated.
Use
getAclTokens() instead |
Future<EventList> |
listEvents()
Like
listEvents(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
listEvents(Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agent
|
Future<EventList> |
listEventsWithOptions(EventListOptions options)
Like
listEventsWithOptions(EventListOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
listEventsWithOptions(EventListOptions options,
Handler<AsyncResult<EventList>> resultHandler)
Returns the most recent events known by the agent.
|
Future<SessionList> |
listNodeSessions(String nodeId)
Like
listNodeSessions(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
listNodeSessions(String nodeId,
Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given node
|
Future<SessionList> |
listNodeSessionsWithOptions(String nodeId,
BlockingQueryOptions options)
Like
listNodeSessionsWithOptions(String, BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
listNodeSessionsWithOptions(String nodeId,
BlockingQueryOptions options,
Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions for a given node
This is blocking query unlike
listNodeSessions(String, Handler) |
Future<SessionList> |
listSessions()
Like
listSessions(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
listSessions(Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions
|
Future<SessionList> |
listSessionsWithOptions(BlockingQueryOptions options)
Like
listSessionsWithOptions(BlockingQueryOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
listSessionsWithOptions(BlockingQueryOptions options,
Handler<AsyncResult<SessionList>> resultHandler)
Returns the active sessions
This is blocking query unlike
listSessions(Handler) |
Future<List<Check>> |
localChecks()
Like
localChecks(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
localChecks(Handler<AsyncResult<List<Check>>> resultHandler)
Return all the checks that are registered with the local agent.
|
Future<List<Service>> |
localServices()
Like
localServices(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
localServices(Handler<AsyncResult<List<Service>>> resultHandler)
Returns list of services registered with the local agent.
|
Future<Void> |
maintenanceService(MaintenanceOptions maintenanceOptions)
Like
maintenanceService(MaintenanceOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
maintenanceService(MaintenanceOptions maintenanceOptions,
Handler<AsyncResult<Void>> resultHandler)
Places a given service into "maintenance mode"
|
Future<Void> |
passCheck(String checkId)
Like
passCheck(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
passCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing".
|
Future<Void> |
passCheckWithNote(String checkId,
String note)
Like
passCheckWithNote(String, String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
passCheckWithNote(String checkId,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "passing".
|
Future<List<String>> |
peersStatus()
Like
peersStatus(Handler) but returns a Future of the asynchronous result. |
ConsulClient |
peersStatus(Handler<AsyncResult<List<String>>> resultHandler)
Retrieves the Raft peers for the datacenter in which the the agent is running.
|
Future<Boolean> |
putValue(String key,
String value)
Like
putValue(String, String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
putValue(String key,
String value,
Handler<AsyncResult<Boolean>> resultHandler)
Adds specified key/value pair
|
Future<Boolean> |
putValueWithOptions(String key,
String value,
KeyValueOptions options)
Like
putValueWithOptions(String, String, KeyValueOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
putValueWithOptions(String key,
String value,
KeyValueOptions options,
Handler<AsyncResult<Boolean>> resultHandler) |
Future<AclToken> |
readAclToken(String accessorId)
Reads an ACL token with the given Accessor ID
|
ConsulClient |
readAclToken(String accessorId,
Handler<AsyncResult<AclToken>> resultHandler)
Reads an ACL token with the given Accessor ID
|
Future<AclPolicy> |
readPolicy(String id)
This endpoint reads an ACL policy with the given ID
|
ConsulClient |
readPolicy(String id,
Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint reads an ACL policy with the given ID
|
Future<AclPolicy> |
readPolicyByName(String name)
This endpoint reads an ACL policy with the given name
|
ConsulClient |
readPolicyByName(String name,
Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint reads an ACL policy with the given name
|
ConsulClient |
registerCatalogService(Node nodeOptions,
ServiceOptions serviceOptions,
Handler<AsyncResult<Void>> resultHandler)
Register node with external service
|
Future<Void> |
registerCheck(CheckOptions checkOptions)
Like
registerCheck(CheckOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
registerCheck(CheckOptions checkOptions,
Handler<AsyncResult<Void>> resultHandler)
Add a new check to the local agent.
|
Future<Void> |
registerService(ServiceOptions serviceOptions)
Like
registerService(ServiceOptions, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
registerService(ServiceOptions serviceOptions,
Handler<AsyncResult<Void>> resultHandler)
Adds a new service, with an optional health check, to the local agent.
|
Future<Session> |
renewSession(String id)
Like
renewSession(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
renewSession(String id,
Handler<AsyncResult<Session>> resultHandler)
Renews the given session.
|
Future<TxnResponse> |
transaction(TxnRequest request)
Like
transaction(TxnRequest, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
transaction(TxnRequest request,
Handler<AsyncResult<TxnResponse>> resultHandler)
Manages multiple operations inside a single, atomic transaction.
|
Future<String> |
updateAclToken(AclToken token)
Deprecated.
|
ConsulClient |
updateAclToken(AclToken token,
Handler<AsyncResult<String>> idHandler)
Deprecated.
|
Future<AclToken> |
updateAclToken(String accessorId,
AclToken token)
Update an existing Acl token
|
ConsulClient |
updateAclToken(String accessorId,
AclToken token,
Handler<AsyncResult<AclToken>> resultHandler)
Update an existing Acl token
|
Future<Void> |
updateCheck(String checkId,
CheckStatus status)
Like
updateCheck(String, CheckStatus, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
updateCheck(String checkId,
CheckStatus status,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status.
|
Future<Void> |
updateCheckWithNote(String checkId,
CheckStatus status,
String note)
Like
updateCheckWithNote(String, CheckStatus, String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
updateCheckWithNote(String checkId,
CheckStatus status,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to given status.
|
Future<AclPolicy> |
updatePolicy(String id,
AclPolicy policy)
This endpoint updates an existing ACL policy
|
ConsulClient |
updatePolicy(String id,
AclPolicy policy,
Handler<AsyncResult<AclPolicy>> resultHandler)
This endpoint updates an existing ACL policy
|
Future<Void> |
updatePreparedQuery(PreparedQueryDefinition definition)
Like
updatePreparedQuery(PreparedQueryDefinition, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
updatePreparedQuery(PreparedQueryDefinition definition,
Handler<AsyncResult<Void>> resultHandler) |
Future<Void> |
warnCheck(String checkId)
Like
warnCheck(String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
warnCheck(String checkId,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning".
|
Future<Void> |
warnCheckWithNote(String checkId,
String note)
Like
warnCheckWithNote(String, String, Handler) but returns a Future of the asynchronous result. |
ConsulClient |
warnCheckWithNote(String checkId,
String note,
Handler<AsyncResult<Void>> resultHandler)
Set status of the check to "warning".
|
static ConsulClient create(Vertx vertx)
vertx
- the Vert.x instancestatic ConsulClient create(Vertx vertx, ConsulClientOptions options)
vertx
- the Vert.x instanceoptions
- the optionsConsulClient agentInfo(Handler<AsyncResult<JsonObject>> resultHandler)
resultHandler
- will be provided with the configuration and member information of the local agentFuture<JsonObject> agentInfo()
agentInfo(Handler)
but returns a Future
of the asynchronous result.ConsulClient coordinateNodes(Handler<AsyncResult<CoordinateList>> resultHandler)
resultHandler
- will be provided with network coordinates of nodes in datacenterFuture<CoordinateList> coordinateNodes()
coordinateNodes(Handler)
but returns a Future
of the asynchronous result.ConsulClient coordinateNodesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<CoordinateList>> resultHandler)
coordinateNodes(Handler)
options
- the blocking optionsresultHandler
- will be provided with network coordinates of nodes in datacenterFuture<CoordinateList> coordinateNodesWithOptions(BlockingQueryOptions options)
coordinateNodesWithOptions(BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient coordinateDatacenters(Handler<AsyncResult<List<DcCoordinates>>> resultHandler)
resultHandler
- will be provided with network coordinates for all Consul serversFuture<List<DcCoordinates>> coordinateDatacenters()
coordinateDatacenters(Handler)
but returns a Future
of the asynchronous result.ConsulClient getKeys(String keyPrefix, Handler<AsyncResult<List<String>>> resultHandler)
keyPrefix
- the prefixresultHandler
- will be provided with keys listFuture<List<String>> getKeys(String keyPrefix)
getKeys(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient getKeysWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<List<String>>> resultHandler)
keyPrefix
- the prefixoptions
- the blocking optionsresultHandler
- will be provided with keys listFuture<List<String>> getKeysWithOptions(String keyPrefix, BlockingQueryOptions options)
getKeysWithOptions(String, BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient getValue(String key, Handler<AsyncResult<KeyValue>> resultHandler)
KeyValue
object will be returned if no such key is found.key
- the keyresultHandler
- will be provided with key/value pairFuture<KeyValue> getValue(String key)
getValue(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient getValueWithOptions(String key, BlockingQueryOptions options, Handler<AsyncResult<KeyValue>> resultHandler)
KeyValue
object will be returned if no such key is found.
This is blocking query unlike getValue(String, Handler)
key
- the keyoptions
- the blocking optionsresultHandler
- will be provided with key/value pairFuture<KeyValue> getValueWithOptions(String key, BlockingQueryOptions options)
getValueWithOptions(String, BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient deleteValue(String key, Handler<AsyncResult<Void>> resultHandler)
key
- the keyresultHandler
- will be called on completeFuture<Void> deleteValue(String key)
deleteValue(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient getValues(String keyPrefix, Handler<AsyncResult<KeyValueList>> resultHandler)
KeyValueList
object will be returned if no such key prefix is found.keyPrefix
- the prefixresultHandler
- will be provided with list of key/value pairsFuture<KeyValueList> getValues(String keyPrefix)
getValues(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient getValuesWithOptions(String keyPrefix, BlockingQueryOptions options, Handler<AsyncResult<KeyValueList>> resultHandler)
KeyValueList
object will be returned if no such key prefix is found.
This is blocking query unlike getValues(String, Handler)
keyPrefix
- the prefixoptions
- the blocking optionsresultHandler
- will be provided with list of key/value pairsFuture<KeyValueList> getValuesWithOptions(String keyPrefix, BlockingQueryOptions options)
getValuesWithOptions(String, BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient deleteValues(String keyPrefix, Handler<AsyncResult<Void>> resultHandler)
keyPrefix
- the prefixresultHandler
- will be called on completeFuture<Void> deleteValues(String keyPrefix)
deleteValues(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient putValue(String key, String value, Handler<AsyncResult<Boolean>> resultHandler)
key
- the keyvalue
- the valueresultHandler
- will be provided with success of operationFuture<Boolean> putValue(String key, String value)
putValue(String, String, Handler)
but returns a Future
of the asynchronous result.ConsulClient putValueWithOptions(String key, String value, KeyValueOptions options, Handler<AsyncResult<Boolean>> resultHandler)
key
- the keyvalue
- the valueoptions
- options used to push pairresultHandler
- will be provided with success of operationFuture<Boolean> putValueWithOptions(String key, String value, KeyValueOptions options)
putValueWithOptions(String, String, KeyValueOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient transaction(TxnRequest request, Handler<AsyncResult<TxnResponse>> resultHandler)
request
- transaction requestresultHandler
- will be provided with result of transactionFuture<TxnResponse> transaction(TxnRequest request)
transaction(TxnRequest, Handler)
but returns a Future
of the asynchronous result.ConsulClient createAclPolicy(AclPolicy policy, Handler<AsyncResult<String>> resultHandler)
policy
- properties of policyresultHandler
- will be provided with result of policyFuture<String> createAclPolicy(AclPolicy policy)
policy
- properties of policyConsulClient readPolicy(String id, Handler<AsyncResult<AclPolicy>> resultHandler)
id
- uuid policyresultHandler
- will be provided with result of policyFuture<AclPolicy> readPolicy(String id)
id
- uuid policyConsulClient readPolicyByName(String name, Handler<AsyncResult<AclPolicy>> resultHandler)
name
- unique name of created policyresultHandler
- will be provided with result of policyFuture<AclPolicy> readPolicyByName(String name)
name
- unique name of created policyreadPolicy(String)
ConsulClient updatePolicy(String id, AclPolicy policy, Handler<AsyncResult<AclPolicy>> resultHandler)
id
- uuid of existing policypolicy
- options that will be applied to the existing policyresultHandler
- will be provided with result of policyFuture<AclPolicy> updatePolicy(String id, AclPolicy policy)
id
- uuid of existing policypolicy
- options that will be applied to the existing policyConsulClient deletePolicy(String id, Handler<AsyncResult<Boolean>> resultHandler)
id
- uuid of existing policyresultHandler
- will be provided with result of policy deletingFuture<Boolean> deletePolicy(String id)
id
- uuid of existing policyConsulClient getAclPolicies(Handler<AsyncResult<List<AclPolicy>>> resultHandler)
resultHandler
- will be provided with result of policy deletingFuture<List<AclPolicy>> getAclPolicies()
ConsulClient createAclToken(AclToken token, Handler<AsyncResult<AclToken>> resultHandler)
token
- properties of the tokenresultHandler
- will be provided with result of tokenAclToken
accessorId - required in the URL path or JSON body for getting, updating and cloning token.
AclToken
secretId - using in ConsulClientOptions.setAclToken(String)
.Future<AclToken> createAclToken(AclToken token)
token
- properties of the tokenAclToken
accessorId - required in the URL path or JSON body for getting, updating and cloning token.
AclToken
secretId - using in ConsulClientOptions.setAclToken(String)
.ConsulClient updateAclToken(String accessorId, AclToken token, Handler<AsyncResult<AclToken>> resultHandler)
accessorId
- uuid of the tokentoken
- properties of the tokenresultHandler
- will be provided with result of tokenFuture<AclToken> updateAclToken(String accessorId, AclToken token)
accessorId
- uuid of the tokentoken
- properties of the tokencreateAclToken(io.vertx.ext.consul.token.AclToken)
ConsulClient cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclToken, Handler<AsyncResult<AclToken>> resultHandler)
accessorId
- uuid of the tokencloneAclToken
- properties of cloned tokenresultHandler
- will be provided with result of tokenFuture<AclToken> cloneAclToken(String accessorId, CloneAclTokenOptions cloneAclTokenOptions)
accessorId
- uuid of the tokencloneAclTokenOptions
- properties of cloned tokencreateAclToken(io.vertx.ext.consul.token.AclToken)
ConsulClient getAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
resultHandler
- will be provided with result of tokensFuture<List<AclToken>> getAclTokens()
ConsulClient readAclToken(String accessorId, Handler<AsyncResult<AclToken>> resultHandler)
accessorId
- uuid of tokenresultHandler
- will be provided with result of tokenFuture<AclToken> readAclToken(String accessorId)
accessorId
- uuid of tokenConsulClient deleteAclToken(String accessorId, Handler<AsyncResult<Boolean>> resultHandler)
accessorId
- uuid of tokenresultHandler
- will be provided with result of token deletingFuture<Boolean> deleteAclToken(String accessorId)
accessorId
- uuid of token@Deprecated ConsulClient createAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
createAclToken(io.vertx.ext.consul.token.AclToken)
insteadtoken
- properties of the tokenidHandler
- will be provided with ID of created token@Deprecated Future<String> createAclToken(AclToken token)
createAclToken(AclToken, Handler)
but returns a Future
of the asynchronous result.@Deprecated ConsulClient updateAclToken(AclToken token, Handler<AsyncResult<String>> idHandler)
updateAclToken(String, io.vertx.ext.consul.token.AclToken)
insteadtoken
- properties of the token to be updatedidHandler
- will be provided with ID of updated@Deprecated Future<String> updateAclToken(AclToken token)
updateAclToken(AclToken, Handler)
but returns a Future
of the asynchronous result.@Deprecated ConsulClient cloneAclToken(String id, Handler<AsyncResult<String>> idHandler)
cloneAclToken(String, CloneAclTokenOptions)
insteadid
- the ID of token to be clonedidHandler
- will be provided with ID of cloned token@Deprecated Future<String> cloneAclToken(String id)
cloneAclToken(String, Handler)
but returns a Future
of the asynchronous result.@Deprecated ConsulClient listAclTokens(Handler<AsyncResult<List<AclToken>>> resultHandler)
getAclTokens()
insteadresultHandler
- will be provided with list of tokens@Deprecated Future<List<AclToken>> listAclTokens()
listAclTokens(Handler)
but returns a Future
of the asynchronous result.@Deprecated ConsulClient infoAclToken(String id, Handler<AsyncResult<AclToken>> tokenHandler)
readAclToken(String)
insteadid
- the ID of tokentokenHandler
- will be provided with token@Deprecated Future<AclToken> infoAclToken(String id)
infoAclToken(String, Handler)
but returns a Future
of the asynchronous result.@Deprecated ConsulClient destroyAclToken(String id, Handler<AsyncResult<Void>> resultHandler)
deleteAclToken(String)
insteadid
- the ID of tokenresultHandler
- will be called on complete@Deprecated Future<Void> destroyAclToken(String id)
destroyAclToken(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient fireEvent(String name, Handler<AsyncResult<Event>> resultHandler)
name
- name of eventresultHandler
- will be provided with properties of eventFuture<Event> fireEvent(String name)
fireEvent(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient fireEventWithOptions(String name, EventOptions options, Handler<AsyncResult<Event>> resultHandler)
name
- name of eventoptions
- options used to create eventresultHandler
- will be provided with properties of eventFuture<Event> fireEventWithOptions(String name, EventOptions options)
fireEventWithOptions(String, EventOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient listEvents(Handler<AsyncResult<EventList>> resultHandler)
resultHandler
- will be provided with list of eventsFuture<EventList> listEvents()
listEvents(Handler)
but returns a Future
of the asynchronous result.ConsulClient listEventsWithOptions(EventListOptions options, Handler<AsyncResult<EventList>> resultHandler)
listEvents(Handler)
. 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.
resultHandler
- will be provided with list of eventsoptions
- the blocking optionsFuture<EventList> listEventsWithOptions(EventListOptions options)
listEventsWithOptions(EventListOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient registerService(ServiceOptions serviceOptions, Handler<AsyncResult<Void>> resultHandler)
serviceOptions
- the options of new serviceresultHandler
- will be called when completeServiceOptions
Future<Void> registerService(ServiceOptions serviceOptions)
registerService(ServiceOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient maintenanceService(MaintenanceOptions maintenanceOptions, Handler<AsyncResult<Void>> resultHandler)
maintenanceOptions
- the maintenance optionsresultHandler
- will be called when completeMaintenanceOptions
Future<Void> maintenanceService(MaintenanceOptions maintenanceOptions)
maintenanceService(MaintenanceOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient deregisterService(String id, Handler<AsyncResult<Void>> resultHandler)
id
- the ID of serviceresultHandler
- will be called when completeFuture<Void> deregisterService(String id)
deregisterService(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogServiceNodes(String service, Handler<AsyncResult<ServiceList>> resultHandler)
service
- name of serviceresultHandler
- will be provided with list of nodes providing given serviceFuture<ServiceList> catalogServiceNodes(String service)
catalogServiceNodes(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogServiceNodesWithOptions(String service, ServiceQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
service
- name of serviceoptions
- options used to request servicesresultHandler
- will be provided with list of nodes providing given serviceFuture<ServiceList> catalogServiceNodesWithOptions(String service, ServiceQueryOptions options)
catalogServiceNodesWithOptions(String, ServiceQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogDatacenters(Handler<AsyncResult<List<String>>> resultHandler)
resultHandler
- will be provided with list of datacentersFuture<List<String>> catalogDatacenters()
catalogDatacenters(Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogNodes(Handler<AsyncResult<NodeList>> resultHandler)
resultHandler
- will be provided with list of nodesFuture<NodeList> catalogNodes()
catalogNodes(Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogNodesWithOptions(NodeQueryOptions options, Handler<AsyncResult<NodeList>> resultHandler)
resultHandler
- will be provided with list of nodesoptions
- options used to request nodesFuture<NodeList> catalogNodesWithOptions(NodeQueryOptions options)
catalogNodesWithOptions(NodeQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient healthChecks(String service, Handler<AsyncResult<CheckList>> resultHandler)
service
- the service nameresultHandler
- will be provided with list of checksFuture<CheckList> healthChecks(String service)
healthChecks(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient healthChecksWithOptions(String service, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
service
- the service nameoptions
- options used to request checksresultHandler
- will be provided with list of checksFuture<CheckList> healthChecksWithOptions(String service, CheckQueryOptions options)
healthChecksWithOptions(String, CheckQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient healthState(HealthState healthState, Handler<AsyncResult<CheckList>> resultHandler)
healthState
- the health stateresultHandler
- will be provided with list of checksFuture<CheckList> healthState(HealthState healthState)
healthState(HealthState, Handler)
but returns a Future
of the asynchronous result.ConsulClient healthStateWithOptions(HealthState healthState, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
healthState
- the health stateoptions
- options used to request checksresultHandler
- will be provided with list of checksFuture<CheckList> healthStateWithOptions(HealthState healthState, CheckQueryOptions options)
healthStateWithOptions(HealthState, CheckQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient healthServiceNodes(String service, boolean passing, Handler<AsyncResult<ServiceEntryList>> resultHandler)
catalogServiceNodes(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateresultHandler
- will be provided with list of servicesFuture<ServiceEntryList> healthServiceNodes(String service, boolean passing)
healthServiceNodes(String, boolean, Handler)
but returns a Future
of the asynchronous result.ConsulClient healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options, Handler<AsyncResult<ServiceEntryList>> resultHandler)
catalogServiceNodesWithOptions(java.lang.String, io.vertx.ext.consul.ServiceQueryOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>)
endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.service
- the service namepassing
- if true, filter results to only nodes with all checks in the passing stateoptions
- options used to request servicesresultHandler
- will be provided with list of servicesFuture<ServiceEntryList> healthServiceNodesWithOptions(String service, boolean passing, ServiceQueryOptions options)
healthServiceNodesWithOptions(String, boolean, ServiceQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient healthNodesWithOptions(String node, CheckQueryOptions options, Handler<AsyncResult<CheckList>> resultHandler)
node
- the node name or IDoptions
- options used to request node health checksFuture<CheckList> healthNodesWithOptions(String node, CheckQueryOptions options)
healthNodesWithOptions(String, CheckQueryOptions, Handler)
but returns a Future
of the asynchronous resultConsulClient catalogServices(Handler<AsyncResult<ServiceList>> resultHandler)
resultHandler
- will be provided with list of servicesFuture<ServiceList> catalogServices()
catalogServices(Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogServicesWithOptions(BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
catalogServices(Handler)
resultHandler
- will be provided with list of servicesoptions
- the blocking optionsFuture<ServiceList> catalogServicesWithOptions(BlockingQueryOptions options)
catalogServicesWithOptions(BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogNodeServices(String node, Handler<AsyncResult<ServiceList>> resultHandler)
node
- node nameresultHandler
- will be provided with list of servicesFuture<ServiceList> catalogNodeServices(String node)
catalogNodeServices(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient catalogNodeServicesWithOptions(String node, BlockingQueryOptions options, Handler<AsyncResult<ServiceList>> resultHandler)
catalogNodeServices(String, Handler)
node
- node nameoptions
- the blocking optionsresultHandler
- will be provided with list of servicesFuture<ServiceList> catalogNodeServicesWithOptions(String node, BlockingQueryOptions options)
catalogNodeServicesWithOptions(String, BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient localServices(Handler<AsyncResult<List<Service>>> resultHandler)
resultHandler
- will be provided with list of servicesFuture<List<Service>> localServices()
localServices(Handler)
but returns a Future
of the asynchronous result.ConsulClient localChecks(Handler<AsyncResult<List<Check>>> resultHandler)
resultHandler
- will be provided with list of checksFuture<List<Check>> localChecks()
localChecks(Handler)
but returns a Future
of the asynchronous result.ConsulClient registerCheck(CheckOptions checkOptions, Handler<AsyncResult<Void>> resultHandler)
checkOptions
- options used to register new checkresultHandler
- will be called when completeFuture<Void> registerCheck(CheckOptions checkOptions)
registerCheck(CheckOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient deregisterCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checkresultHandler
- will be called when completeFuture<Void> deregisterCheck(String checkId)
deregisterCheck(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient passCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checkresultHandler
- will be called when completeCheckStatus
Future<Void> passCheck(String checkId)
passCheck(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient passCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeCheckStatus
Future<Void> passCheckWithNote(String checkId, String note)
passCheckWithNote(String, String, Handler)
but returns a Future
of the asynchronous result.ConsulClient warnCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checkresultHandler
- will be called when completeCheckStatus
Future<Void> warnCheck(String checkId)
warnCheck(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient warnCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeCheckStatus
Future<Void> warnCheckWithNote(String checkId, String note)
warnCheckWithNote(String, String, Handler)
but returns a Future
of the asynchronous result.ConsulClient failCheck(String checkId, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checkresultHandler
- will be called when completeCheckStatus
Future<Void> failCheck(String checkId)
failCheck(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient failCheckWithNote(String checkId, String note, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeCheckStatus
Future<Void> failCheckWithNote(String checkId, String note)
failCheckWithNote(String, String, Handler)
but returns a Future
of the asynchronous result.ConsulClient updateCheck(String checkId, CheckStatus status, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checkstatus
- new status of checkresultHandler
- will be called when completeFuture<Void> updateCheck(String checkId, CheckStatus status)
updateCheck(String, CheckStatus, Handler)
but returns a Future
of the asynchronous result.ConsulClient updateCheckWithNote(String checkId, CheckStatus status, String note, Handler<AsyncResult<Void>> resultHandler)
checkId
- the ID of checkstatus
- new status of checknote
- specifies a human-readable message. This will be passed through to the check's Output
field.resultHandler
- will be called when completeFuture<Void> updateCheckWithNote(String checkId, CheckStatus status, String note)
updateCheckWithNote(String, CheckStatus, String, Handler)
but returns a Future
of the asynchronous result.ConsulClient leaderStatus(Handler<AsyncResult<String>> resultHandler)
10.1.10.12:8300
"resultHandler
- will be provided with address of cluster leaderFuture<String> leaderStatus()
leaderStatus(Handler)
but returns a Future
of the asynchronous result.ConsulClient peersStatus(Handler<AsyncResult<List<String>>> resultHandler)
10.1.10.12:8300
", "10.1.10.13:8300
"resultHandler
- will be provided with list of peersFuture<List<String>> peersStatus()
peersStatus(Handler)
but returns a Future
of the asynchronous result.ConsulClient createSession(Handler<AsyncResult<String>> idHandler)
idHandler
- will be provided with ID of new sessionFuture<String> createSession()
createSession(Handler)
but returns a Future
of the asynchronous result.ConsulClient createSessionWithOptions(SessionOptions options, Handler<AsyncResult<String>> idHandler)
options
- options used to create sessionidHandler
- will be provided with ID of new sessionFuture<String> createSessionWithOptions(SessionOptions options)
createSessionWithOptions(SessionOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient infoSession(String id, Handler<AsyncResult<Session>> resultHandler)
id
- the ID of requested sessionresultHandler
- will be provided with info of requested sessionFuture<Session> infoSession(String id)
infoSession(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient infoSessionWithOptions(String id, BlockingQueryOptions options, Handler<AsyncResult<Session>> resultHandler)
infoSession(String, Handler)
id
- the ID of requested sessionoptions
- the blocking optionsresultHandler
- will be provided with info of requested sessionFuture<Session> infoSessionWithOptions(String id, BlockingQueryOptions options)
infoSessionWithOptions(String, BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient renewSession(String id, Handler<AsyncResult<Session>> resultHandler)
id
- the ID of session that should be renewedresultHandler
- will be provided with info of renewed sessionFuture<Session> renewSession(String id)
renewSession(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient listSessions(Handler<AsyncResult<SessionList>> resultHandler)
resultHandler
- will be provided with list of sessionsFuture<SessionList> listSessions()
listSessions(Handler)
but returns a Future
of the asynchronous result.ConsulClient listSessionsWithOptions(BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
listSessions(Handler)
options
- the blocking optionsresultHandler
- will be provided with list of sessionsFuture<SessionList> listSessionsWithOptions(BlockingQueryOptions options)
listSessionsWithOptions(BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient listNodeSessions(String nodeId, Handler<AsyncResult<SessionList>> resultHandler)
nodeId
- the ID of noderesultHandler
- will be provided with list of sessionsFuture<SessionList> listNodeSessions(String nodeId)
listNodeSessions(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options, Handler<AsyncResult<SessionList>> resultHandler)
listNodeSessions(String, Handler)
nodeId
- the ID of nodeoptions
- the blocking optionsresultHandler
- will be provided with list of sessionsFuture<SessionList> listNodeSessionsWithOptions(String nodeId, BlockingQueryOptions options)
listNodeSessionsWithOptions(String, BlockingQueryOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient destroySession(String id, Handler<AsyncResult<Void>> resultHandler)
id
- the ID of sessionresultHandler
- will be called when completeFuture<Void> destroySession(String id)
destroySession(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient createPreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<String>> resultHandler)
definition
- definition of the prepare queryresultHandler
- will be provided with id of created prepare queryFuture<String> createPreparedQuery(PreparedQueryDefinition definition)
createPreparedQuery(PreparedQueryDefinition, Handler)
but returns a Future
of the asynchronous result.ConsulClient getPreparedQuery(String id, Handler<AsyncResult<PreparedQueryDefinition>> resultHandler)
id
- the id of the query to readresultHandler
- will be provided with definition of the prepare queryFuture<PreparedQueryDefinition> getPreparedQuery(String id)
getPreparedQuery(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient getAllPreparedQueries(Handler<AsyncResult<List<PreparedQueryDefinition>>> resultHandler)
resultHandler
- will be provided with list of definitions of the all prepare queriesFuture<List<PreparedQueryDefinition>> getAllPreparedQueries()
getAllPreparedQueries(Handler)
but returns a Future
of the asynchronous result.ConsulClient updatePreparedQuery(PreparedQueryDefinition definition, Handler<AsyncResult<Void>> resultHandler)
definition
- definition of the prepare queryresultHandler
- will be called when completeFuture<Void> updatePreparedQuery(PreparedQueryDefinition definition)
updatePreparedQuery(PreparedQueryDefinition, Handler)
but returns a Future
of the asynchronous result.ConsulClient deletePreparedQuery(String id, Handler<AsyncResult<Void>> resultHandler)
id
- the id of the query to deleteresultHandler
- will be called when completeFuture<Void> deletePreparedQuery(String id)
deletePreparedQuery(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient executePreparedQuery(String query, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
query
- 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.resultHandler
- will be provided with responseFuture<PreparedQueryExecuteResponse> executePreparedQuery(String query)
executePreparedQuery(String, Handler)
but returns a Future
of the asynchronous result.ConsulClient executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options, Handler<AsyncResult<PreparedQueryExecuteResponse>> resultHandler)
query
- 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
- the options used to execute prepared queryresultHandler
- will be provided with responseFuture<PreparedQueryExecuteResponse> executePreparedQueryWithOptions(String query, PreparedQueryExecuteOptions options)
executePreparedQueryWithOptions(String, PreparedQueryExecuteOptions, Handler)
but returns a Future
of the asynchronous result.ConsulClient registerCatalogService(Node nodeOptions, ServiceOptions serviceOptions, Handler<AsyncResult<Void>> resultHandler)
nodeOptions
- the options of new nodeserviceOptions
- the options of new serviceresultHandler
- will be provided with responseConsulClient deregisterCatalogService(String nodeId, String serviceId, Handler<AsyncResult<Void>> resultHandler)
nodeId
- the ID of nodeserviceId
- the ID of the service to de-registered; if it is null, the node itself will be de-registered (as well as the entities that belongs to that node)resultHandler
- will be called when completevoid close()
Copyright © 2024 Eclipse. All rights reserved.