com.palantir.atlasdb.timelock.api.DialogueConjureTimelockEndpoints 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;
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 DialogueConjureTimelockEndpoints implements Endpoint {
startTransactions {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("st")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "startTransactions";
}
@Override
public String version() {
return VERSION;
}
},
getFreshTimestamps {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("ts")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "getFreshTimestamps";
}
@Override
public String version() {
return VERSION;
}
},
leaderTime {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("lt")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "leaderTime";
}
@Override
public String version() {
return VERSION;
}
},
lock {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("l")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "lock";
}
@Override
public String version() {
return VERSION;
}
},
waitForLocks {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("wl")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "waitForLocks";
}
@Override
public String version() {
return VERSION;
}
},
refreshLocks {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("rl")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "refreshLocks";
}
@Override
public String version() {
return VERSION;
}
},
unlock {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("ul")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "unlock";
}
@Override
public String version() {
return VERSION;
}
},
/**
* Batched endpoint for acquiring commit timestamps (a list of fresh timestamps) and the list of all lock watch
* events since the last known version up to after the commit timestamps have been issued.
*/
getCommitTimestamps {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("gct")
.variable("namespace")
.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 "ConjureTimelockService";
}
@Override
public String endpointName() {
return "getCommitTimestamps";
}
@Override
public String version() {
return VERSION;
}
};
private static final String VERSION = Optional.ofNullable(
DialogueConjureTimelockEndpoints.class.getPackage().getImplementationVersion())
.orElse("0.0.0");
}