All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.palantir.atlasdb.timelock.api.DialogueMultiClientConjureTimelockEndpoints Maven / Gradle / Ivy

There is a newer version: 0.1152.0
Show newest version
package com.palantir.atlasdb.timelock.api;

import com.google.common.collect.ImmutableSet;
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 java.util.Set;
import javax.annotation.processing.Generated;

@Generated("com.palantir.conjure.java.services.dialogue.DialogueEndpointsGenerator")
enum DialogueMultiClientConjureTimelockEndpoints implements Endpoint {
    /** Version of ConjureTimelockService#leaderTime endpoint for acquiring leaderTimes for a set of namespaces. */
    leaderTimes {
        private final PathTemplate pathTemplate =
                PathTemplate.builder().fixed("tl").fixed("multi").fixed("lts").build();

        private final ImmutableSet tags = ImmutableSet.of("server-request-context");

        @Override
        public void renderPath(ListMultimap params, UrlBuilder url) {
            pathTemplate.fill(params, url);
        }

        @Override
        public HttpMethod httpMethod() {
            return HttpMethod.POST;
        }

        @Override
        public String serviceName() {
            return "MultiClientConjureTimelockService";
        }

        @Override
        public String endpointName() {
            return "leaderTimes";
        }

        @Override
        public String version() {
            return VERSION;
        }

        @Override
        public Set tags() {
            return tags;
        }
    },

    /** Version of ConjureTimelockService#startTransactions that starts transactions for multiple namespaces. */
    startTransactions {
        private final PathTemplate pathTemplate =
                PathTemplate.builder().fixed("tl").fixed("multi").fixed("sts").build();

        private final ImmutableSet tags = ImmutableSet.of("server-request-context");

        @Override
        public void renderPath(ListMultimap params, UrlBuilder url) {
            pathTemplate.fill(params, url);
        }

        @Override
        public HttpMethod httpMethod() {
            return HttpMethod.POST;
        }

        @Override
        public String serviceName() {
            return "MultiClientConjureTimelockService";
        }

        @Override
        public String endpointName() {
            return "startTransactions";
        }

        @Override
        public String version() {
            return VERSION;
        }

        @Override
        public Set tags() {
            return tags;
        }
    },

    /**
     * Version of ConjureTimelockService#getCommitTimestamps for acquiring commit timestamps for multiple namespaces.
     */
    getCommitTimestamps {
        private final PathTemplate pathTemplate =
                PathTemplate.builder().fixed("tl").fixed("multi").fixed("gcts").build();

        private final ImmutableSet tags = ImmutableSet.of("server-request-context");

        @Override
        public void renderPath(ListMultimap params, UrlBuilder url) {
            pathTemplate.fill(params, url);
        }

        @Override
        public HttpMethod httpMethod() {
            return HttpMethod.POST;
        }

        @Override
        public String serviceName() {
            return "MultiClientConjureTimelockService";
        }

        @Override
        public String endpointName() {
            return "getCommitTimestamps";
        }

        @Override
        public String version() {
            return VERSION;
        }

        @Override
        public Set tags() {
            return tags;
        }
    },

    /** Version of ConjureTimelockService#startTransactions that starts transactions for multiple namespaces. */
    startTransactionsForClients {
        private final PathTemplate pathTemplate =
                PathTemplate.builder().fixed("tl").fixed("multi").fixed("stsfc").build();

        private final ImmutableSet tags = ImmutableSet.of("server-request-context");

        @Override
        public void renderPath(ListMultimap params, UrlBuilder url) {
            pathTemplate.fill(params, url);
        }

        @Override
        public HttpMethod httpMethod() {
            return HttpMethod.POST;
        }

        @Override
        public String serviceName() {
            return "MultiClientConjureTimelockService";
        }

        @Override
        public String endpointName() {
            return "startTransactionsForClients";
        }

        @Override
        public String version() {
            return VERSION;
        }

        @Override
        public Set tags() {
            return tags;
        }
    },

    /**
     * Version of ConjureTimelockService#getCommitTimestamps for acquiring commit timestamps for multiple namespaces.
     */
    getCommitTimestampsForClients {
        private final PathTemplate pathTemplate = PathTemplate.builder()
                .fixed("tl")
                .fixed("multi")
                .fixed("gctsfc")
                .build();

        private final ImmutableSet tags = ImmutableSet.of("server-request-context");

        @Override
        public void renderPath(ListMultimap params, UrlBuilder url) {
            pathTemplate.fill(params, url);
        }

        @Override
        public HttpMethod httpMethod() {
            return HttpMethod.POST;
        }

        @Override
        public String serviceName() {
            return "MultiClientConjureTimelockService";
        }

        @Override
        public String endpointName() {
            return "getCommitTimestampsForClients";
        }

        @Override
        public String version() {
            return VERSION;
        }

        @Override
        public Set tags() {
            return tags;
        }
    },

    /** Version of unlockV2 to unlock locks across multiple namespaces. */
    unlock {
        private final PathTemplate pathTemplate =
                PathTemplate.builder().fixed("tl").fixed("multi").fixed("ul").build();

        private final ImmutableSet tags = ImmutableSet.of("server-request-context");

        @Override
        public void renderPath(ListMultimap params, UrlBuilder url) {
            pathTemplate.fill(params, url);
        }

        @Override
        public HttpMethod httpMethod() {
            return HttpMethod.POST;
        }

        @Override
        public String serviceName() {
            return "MultiClientConjureTimelockService";
        }

        @Override
        public String endpointName() {
            return "unlock";
        }

        @Override
        public String version() {
            return VERSION;
        }

        @Override
        public Set tags() {
            return tags;
        }
    };

    private static final String VERSION = Optional.ofNullable(DialogueMultiClientConjureTimelockEndpoints.class
                    .getPackage()
                    .getImplementationVersion())
            .orElse("0.0.0");
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy