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

com.palantir.atlasdb.timelock.api.management.UndertowTimeLockManagementService Maven / Gradle / Ivy

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

import com.google.common.util.concurrent.ListenableFuture;
import com.palantir.atlasdb.timelock.api.DisableNamespacesRequest;
import com.palantir.atlasdb.timelock.api.DisableNamespacesResponse;
import com.palantir.atlasdb.timelock.api.ReenableNamespacesRequest;
import com.palantir.atlasdb.timelock.api.ReenableNamespacesResponse;
import com.palantir.tokens.auth.AuthHeader;
import java.util.Set;
import java.util.UUID;
import javax.annotation.Generated;

@Generated("com.palantir.conjure.java.services.UndertowServiceInterfaceGenerator")
public interface UndertowTimeLockManagementService {
    /**
     * The endpoint loads all persisted namespaces. leaderPaxos is filtered out from the set
     * as it is not a namespace.
     * @apiNote {@code POST /tl/management/getNamespaces}
     */
    ListenableFuture> getNamespaces(AuthHeader authHeader);

    /**
     * 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.
     * @apiNote {@code POST /tl/management/achieveConsensus}
     */
    ListenableFuture achieveConsensus(AuthHeader authHeader, Set namespaces);

    /**
     * Invalidates existing resources for a given TimeLock namespace in a persistant way, until re-enabled. Does not
     * actually cause a leader election, and should not interrupt service for other naemspaces. Note that this
     * operation is atomic for each namespace (e.g. users will not see two different lock services servicing the
     * same startTransactions request), but not atomic as a whole. Additionally, if this method throws, it is
     * nondeterministic which, if any, namespaces have been invalidated; some may even be invalidated only on a
     * subset of nodes. This state can be cleared by re-enabling all namespaces.
     * @apiNote {@code POST /tl/management/invalidateResources}
     */
    ListenableFuture invalidateResources(AuthHeader authHeader, Set namespaces);

    /**
     * Disables the TimeLock server in a persistant way for the specified namespaces. This includes invalidating
     * all currently held locks, all lock watch state, as well as refusing to serve new requests.
     * @apiNote {@code POST /tl/management/disable}
     */
    ListenableFuture disableTimelock(
            AuthHeader authHeader, DisableNamespacesRequest request);

    /**
     * Allows the TimeLock server to once again serve requests for these namespaces.
     * @apiNote {@code POST /tl/management/reenable}
     */
    ListenableFuture reenableTimelock(
            AuthHeader authHeader, ReenableNamespacesRequest request);

    /**
     * Gets the randomly generated server id associated with the server's current lifecycle upon start up.
     * @apiNote {@code POST /tl/management/getServerLifecycleId}
     */
    ListenableFuture getServerLifecycleId(AuthHeader authHeader);

    /**
     * Kills TimeLock server asynchronously i.e. current server will not be able to talk to
     * peer nodes or serve requests once the task is executed. After hitting this endpoint, the server will require
     * external intervention to start up the service again. The endpoint returns the (randomly generated) server id
     * associated with server upon start up. A client can then make getServerId requests wherein change in
     * server id would imply that the server was bounced.
     * @apiNote {@code POST /tl/management/forceKillTimeLockServer}
     */
    ListenableFuture forceKillTimeLockServer(AuthHeader authHeader);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy