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

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

There is a newer version: 0.1152.0
Show newest version
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");
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy