com.palantir.atlasdb.timelock.api.management.DialogueTimeLockManagementEndpoints 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.api.management;
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.Map;
import java.util.Optional;
import javax.annotation.Generated;
@Generated("com.palantir.conjure.java.services.dialogue.DialogueEndpointsGenerator")
enum DialogueTimeLockManagementEndpoints implements Endpoint {
/**
* The endpoint loads all persisted namespaces. leaderPaxos
is filtered out from the set
* as it is not a namespace.
*/
getNamespaces {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("management")
.fixed("getNamespaces")
.build();
@Override
public void renderPath(Map params, UrlBuilder url) {
pathTemplate.fill(params, url);
}
@Override
public HttpMethod httpMethod() {
return HttpMethod.POST;
}
@Override
public String serviceName() {
return "TimeLockManagementService";
}
@Override
public String endpointName() {
return "getNamespaces";
}
@Override
public String version() {
return VERSION;
}
},
/**
* The operation of achieving consensus on all namespaces is NOT atomic. In the case of failures, it can
* be assumed that consensus was achieved on some namespaces.
*/
achieveConsensus {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("management")
.fixed("achieveConsensus")
.build();
@Override
public void renderPath(Map params, UrlBuilder url) {
pathTemplate.fill(params, url);
}
@Override
public HttpMethod httpMethod() {
return HttpMethod.POST;
}
@Override
public String serviceName() {
return "TimeLockManagementService";
}
@Override
public String endpointName() {
return "achieveConsensus";
}
@Override
public String version() {
return VERSION;
}
};
private static final String VERSION = Optional.ofNullable(
DialogueTimeLockManagementEndpoints.class.getPackage().getImplementationVersion())
.orElse("0.0.0");
}