use of mousio.etcd4j.requests.EtcdKeyPutRequest in project camel by apache.
the class EtcdKeysProducer method processSet.
// *************************************************************************
// Processors
// *************************************************************************
private void processSet(EtcdClient client, String path, Exchange exchange) throws Exception {
EtcdKeyPutRequest request = client.put(path, exchange.getIn().getBody(String.class));
setRequestTimeToLive(request, exchange);
setRequestTimeout(request, exchange);
try {
exchange.getIn().setHeader(EtcdConstants.ETCD_NAMESPACE, getNamespace());
exchange.getIn().setBody(request.send().get());
} catch (TimeoutException e) {
throw new ExchangeTimedOutException(exchange, configuration.getTimeout());
}
}
Aggregations