package com.atlassian.bitbucket.mesh.rpc;

/**
 * Utility class with constants for Mesh configuration properties that can be used by the control plane to configure
 * Mesh nodes using {@code ManagementService/SetConfiguration}.
 */
public final class ManagedConfigurationProperties {

    //Authentication properties
    public static final String AUTH_ALLOWED_CLOCK_SKEW = "authentication.allowed-clock-skew";
    public static final String AUTH_EXPIRY_INTERVAL = "authentication.expiry-interval";

    //Git properties
    public static final String COMMIT_MESSAGE_MAX = "commit.message.max";
    
    //Git GC properties
    public static final String GC_COMMIT_GRAPH_FULL_THRESHOLD = "gc.commit-graph.threshold.full";
    public static final String GC_FULL_VACUUM_INTERVAL = "gc.vacuum.full.interval";
    public static final String GC_CONVERT_STASH_REFS = "gc.convert.stash-refs";
    public static final String GC_DELAY = "gc.delay";
    public static final String GC_LOG_RETENTION = "gc.log.retention";
    public static final String GC_MAX_ATTEMPTS = "gc.max-attempts";
    public static final String GC_PACKREFS_INTERVAL = "gc.packrefs.interval";
    public static final String GC_PACKREFS_TIMEOUT = "gc.packrefs.timeout";
    public static final String GC_PRUNE_EXPIRE_DEFAULT = "gc.prune.expire.default";
    public static final String GC_PRUNE_EXPIRE_SHARED_OBJECTS = "gc.prune.expire.shared-objects";
    public static final String GC_REPACK_INTERVAL = "gc.repack.interval";
    public static final String GC_REPACK_THRESHOLD_LOOSE = "gc.repack.threshold.loose";
    public static final String GC_REPACK_THRESHOLD_LOOSE_SIZE = "gc.repack.threshold.loose-size";
    public static final String GC_REPACK_THRESHOLD_PACK = "gc.repack.threshold.pack";
    public static final String GC_REPACK_TIMEOUT = "gc.repack.timeout";
    public static final String GC_THREADS = "gc.threads";
    public static final String GC_VACUUM_INTERVAL = "gc.vacuum.interval";
    
    //Git hooks properties
    public static final String HOOKS_BUFFER_CAPACITY = "hooks.buffer.capacity";
    public static final String HOOKS_CALLBACK_TIMEOUT = "hooks.callback.timeout";

    //Git hosting properties
    public static final String HOSTING_ALLOW_FILTER = "hosting.allow-filter";
    public static final String HOSTING_ATOMIC_INITIAL_PUSH = "hosting.atomic-initial-push";

    //gRPC properties
    public static final String GRPC_FRAGMENT_SIZE = "grpc.fragment-size";
    public static final String GRPC_MAX_FRAGMENT_SIZE = "grpc.max-fragment-size";
    public static final String GRPC_MAX_MESSAGE_SIZE = "grpc.max-message-size";
    public static final String GRPC_MAX_METADATA_SIZE = "grpc.max-metadata-size";
    public static final String GRPC_SERVER_KEEP_ALIVE_TIME = "grpc.server.keep-alive.time";
    public static final String GRPC_SERVER_KEEP_ALIVE_WITHOUT_CALLS = "grpc.server.keep-alive.without-calls";
    public static final String GRPC_SERVER_RESTART_ON_CONFIG_CHANGE = "grpc.server.restart-on-configuration-change";
    public static final String GRPC_SERVER_SHUTDOWN_TIMEOUT = "grpc.server.shutdown-timeout";
    public static final String GRPC_ZERO_COPY = "grpc.zero-copy";

    //LFS
    public static final String LFS_MINIMUM_FREE_SPACE = "lfs.minimum.free.space";

    //Node
    public static final String NODE_ID = "node.id";
    public static final String NODE_NAME = "node.name";
    public static final String NODE_RPC_URL = "node.rpc-url";

    //Replication properties
    public static final String REPLICATION_CONTENT_HASH_FORCED_RECALCULATION_FREQUENCY =
            "replication.content-hash-forced-recalculation-frequency";
    public static final String REPLICATION_QUORUM_MODE = "replication.quorum-mode";

    //Process properties
    public static final String PROCESS_TIMEOUT_EXECUTION = "process.timeout.execution";
    public static final String PROCESS_TIMEOUT_IDLE = "process.timeout.idle";

    //Profiling
    public static final String PROFILING_ENABLED = "profiling.enabled";
    public static final String PROFILING_MIN_FRAME_TIME = "profiling.min-frame-time";
    public static final String PROFILING_MIN_TRACE_TIME = "profiling.min-trace-time";
    public static final String PROFILING_MAX_FRAME_NAME_LENGTH = "profiling.max-frame-name-length";

    //Storage
    public static final String STORAGE_CLEANUP_THREADS = "storage.cleanup-threads";
    public static final String STORAGE_PARTITION_CLEANUP_DELAY = "storage.partition-cleanup-delay";
    public static final String STORAGE_TEMP_EXPIRY = "storage.temp-expiry";

    //Throttling
    public static final String THROTTLE_SCALING_CONCURRENCY = "scaling.concurrency";
    public static final String THROTTLE_RESOURCE_LFS = "throttle.resource.git-lfs";
    public static final String THROTTLE_RESOURCE_LFS_LIMIT = "throttle.resource.git-lfs.fixed.limit";
    public static final String THROTTLE_RESOURCE_LFS_TIMEOUT = "throttle.resource.git-lfs.timeout";
    public static final String THROTTLE_RESOURCE_MIRROR_HOSTING = "throttle.resource.mirror-hosting";
    public static final String THROTTLE_RESOURCE_MIRROR_HOSTING_LIMIT = "throttle.resource.mirror-hosting.fixed.limit";
    public static final String THROTTLE_RESOURCE_MIRROR_HOSTING_TIMEOUT = "throttle.resource.mirror-hosting.timeout";
    public static final String THROTTLE_RESOURCE_SCM_COMMAND = "throttle.resource.scm-command";
    public static final String THROTTLE_RESOURCE_SCM_COMMAND_LIMIT = "throttle.resource.scm-command.fixed.limit";
    public static final String THROTTLE_RESOURCE_SCM_COMMAND_TIMEOUT = "throttle.resource.scm-command.timeout";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING = "throttle.resource.scm-hosting";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING_ADAPTIVE_CPU_TARGET =
            "throttle.resource.scm-hosting.adaptive.cpu.target";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING_ADAPTIVE_LIMIT_MAX =
            "throttle.resource.scm-hosting.adaptive.limit.max";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING_ADAPTIVE_LIMIT_MIN =
            "throttle.resource.scm-hosting.adaptive.limit.min";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING_ADAPTIVE_MEM_PER_TICKET =
            "throttle.resource.scm-hosting.adaptive.mem.per.ticket";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING_LIMIT = "throttle.resource.scm-hosting.fixed.limit";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING_STRATEGY = "throttle.resource.scm-hosting.strategy";
    public static final String THROTTLE_RESOURCE_SCM_HOSTING_TIMEOUT = "throttle.resource.scm-hosting.timeout";
    public static final String THROTTLE_RESOURCE_SCM_REFS = "throttle.resource.scm-refs";
    public static final String THROTTLE_RESOURCE_SCM_REFS_LIMIT = "throttle.resource.scm-refs.fixed.limit";
    public static final String THROTTLE_RESOURCE_SCM_REFS_TIMEOUT = "throttle.resource.scm-refs.timeout";

    private ManagedConfigurationProperties() {
        throw new UnsupportedOperationException("Utility classes should not be instantiated");
    }
}
