com.palantir.atlasdb.timelock.adjudicate.feedback.DialogueTimeLockClientFeedbackEndpoints Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timelock-api-dialogue Show documentation
Show all versions of timelock-api-dialogue Show documentation
Palantir open source project
package com.palantir.atlasdb.timelock.adjudicate.feedback;
import com.google.common.collect.ListMultimap;
import com.palantir.dialogue.Endpoint;
import com.palantir.dialogue.HttpMethod;
import com.palantir.dialogue.PathTemplate;
import com.palantir.dialogue.UrlBuilder;
import java.lang.Override;
import java.lang.String;
import java.util.Optional;
import javax.annotation.processing.Generated;
@Generated("com.palantir.conjure.java.services.dialogue.DialogueEndpointsGenerator")
enum DialogueTimeLockClientFeedbackEndpoints implements Endpoint {
/** The endpoint receives feedback reports from clients which are required for TimeLock Adjudication. */
reportFeedback {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("feedback")
.fixed("reportFeedback")
.build();
@Override
public void renderPath(ListMultimap params, UrlBuilder url) {
pathTemplate.fill(params, url);
}
@Override
public HttpMethod httpMethod() {
return HttpMethod.POST;
}
@Override
public String serviceName() {
return "TimeLockClientFeedbackService";
}
@Override
public String endpointName() {
return "reportFeedback";
}
@Override
public String version() {
return VERSION;
}
},
/**
* This endpoint recieves stats about Timelock leader election durations from all clients, then aggregates them on
* the server side.
*/
reportLeaderMetrics {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("feedback")
.fixed("reportLeaderMetrics")
.build();
@Override
public void renderPath(ListMultimap params, UrlBuilder url) {
pathTemplate.fill(params, url);
}
@Override
public HttpMethod httpMethod() {
return HttpMethod.POST;
}
@Override
public String serviceName() {
return "TimeLockClientFeedbackService";
}
@Override
public String endpointName() {
return "reportLeaderMetrics";
}
@Override
public String version() {
return VERSION;
}
};
private static final String VERSION = Optional.ofNullable(
DialogueTimeLockClientFeedbackEndpoints.class.getPackage().getImplementationVersion())
.orElse("0.0.0");
}