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

com.microsoft.azure.toolkit.lib.cosmos.model.DatabaseConfig Maven / Gradle / Ivy

There is a newer version: 0.48.0
Show newest version
/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

package com.microsoft.azure.toolkit.lib.cosmos.model;

import com.microsoft.azure.toolkit.lib.common.utils.Utils;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class DatabaseConfig extends ThroughputConfig {
    private String name;

    public static DatabaseConfig getDefaultDatabaseConfig() {
        return getDefaultDatabaseConfig("database");
    }

    public static DatabaseConfig getDefaultDatabaseConfig(final String prefix) {
        final DatabaseConfig result = new DatabaseConfig();
        result.setName(String.format("%s%s", prefix, Utils.getTimestamp()));
        result.setMaxThroughput(4000);
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy