use of mousio.etcd4j.requests.EtcdKeyDeleteRequest in project camel by apache.
the class EtcdKeysProducer method processDel.
private void processDel(EtcdClient client, String path, boolean dir, Exchange exchange) throws Exception {
EtcdKeyDeleteRequest request = client.delete(path);
setRequestTimeout(request, exchange);
setRequestRecursive(request, exchange);
if (dir) {
request.dir();
}
try {
exchange.getIn().setHeader(EtcdConstants.ETCD_NAMESPACE, getNamespace());
exchange.getIn().setBody(request.send().get());
} catch (TimeoutException e) {
throw new ExchangeTimedOutException(exchange, configuration.getTimeout());
}
}
Aggregations