com.palantir.atlasdb.timelock.api.MultiClientConjureTimelockServiceBlocking 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.conjure.java.lib.internal.ClientEndpoint;
import com.palantir.dialogue.Channel;
import com.palantir.dialogue.ConjureRuntime;
import com.palantir.dialogue.Deserializer;
import com.palantir.dialogue.DialogueService;
import com.palantir.dialogue.DialogueServiceFactory;
import com.palantir.dialogue.Endpoint;
import com.palantir.dialogue.EndpointChannel;
import com.palantir.dialogue.EndpointChannelFactory;
import com.palantir.dialogue.PlainSerDe;
import com.palantir.dialogue.Request;
import com.palantir.dialogue.Serializer;
import com.palantir.dialogue.TypeMarker;
import com.palantir.tokens.auth.AuthHeader;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Map;
import java.util.Set;
import javax.annotation.Generated;
@Generated("com.palantir.conjure.java.services.dialogue.DialogueInterfaceGenerator")
@DialogueService(MultiClientConjureTimelockServiceBlocking.Factory.class)
public interface MultiClientConjureTimelockServiceBlocking {
/**
* Version of ConjureTimelockService#leaderTime endpoint for acquiring leaderTimes for a set of namespaces.
* @apiNote {@code POST /tl/multi/lts}
*/
@ClientEndpoint(method = "POST", path = "/tl/multi/lts")
LeaderTimes leaderTimes(AuthHeader authHeader, Set namespaces);
/**
* Version of ConjureTimelockService#startTransactions that starts transactions for multiple namespaces.
* @apiNote {@code POST /tl/multi/sts}
* @deprecated This endpoint is deprecated. Please use {@link #startTransactionsForClients} to start transactions for multiple clients.
*/
@ClientEndpoint(method = "POST", path = "/tl/multi/sts")
@Deprecated
Map startTransactions(
AuthHeader authHeader, Map requests);
/**
* Version of ConjureTimelockService#getCommitTimestamps for acquiring commit timestamps for multiple namespaces.
* @apiNote {@code POST /tl/multi/gcts}
* @deprecated This endpoint is deprecated. Please use {@link #getCommitTimestampsForClients} to get commit timestamps for multiple clients.
*/
@ClientEndpoint(method = "POST", path = "/tl/multi/gcts")
@Deprecated
Map getCommitTimestamps(
AuthHeader authHeader, Map requests);
/**
* Version of ConjureTimelockService#startTransactions that starts transactions for multiple namespaces.
* @apiNote {@code POST /tl/multi/stsfc}
*/
@ClientEndpoint(method = "POST", path = "/tl/multi/stsfc")
Map startTransactionsForClients(
AuthHeader authHeader, Map requests);
/**
* Version of ConjureTimelockService#getCommitTimestamps for acquiring commit timestamps for multiple namespaces.
* @apiNote {@code POST /tl/multi/gctsfc}
*/
@ClientEndpoint(method = "POST", path = "/tl/multi/gctsfc")
Map getCommitTimestampsForClients(
AuthHeader authHeader, Map requests);
/**
* Creates a synchronous/blocking client for a MultiClientConjureTimelockService service.
*/
static MultiClientConjureTimelockServiceBlocking of(
EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) {
return new MultiClientConjureTimelockServiceBlocking() {
private final PlainSerDe _plainSerDe = _runtime.plainSerDe();
private final Serializer> leaderTimesSerializer =
_runtime.bodySerDe().serializer(new TypeMarker>() {});
private final EndpointChannel leaderTimesChannel =
_endpointChannelFactory.endpoint(DialogueMultiClientConjureTimelockEndpoints.leaderTimes);
private final Deserializer leaderTimesDeserializer =
_runtime.bodySerDe().deserializer(new TypeMarker() {});
private final Serializer