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

com.datastax.stargate.sdk.rest.domain.Keyspace Maven / Gradle / Ivy

There is a newer version: 2.3.7
Show newest version
/*
 * Copyright DataStax, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.datastax.stargate.sdk.rest.domain;

import java.util.List;

import com.datastax.stargate.sdk.core.DataCenter;

/**
 * Represent a keyspace definition with its relevant MetaData.
 */
public class Keyspace {
    
    /** Unique identifier for the keyspace. */
    protected String name;
    
    /** This property is used for local deployments. (SimpleStrategy) */
    protected Integer replicas;
    
    /** This property is used for distributed deployment (NetworkTopologyStrategy). */
    protected List datacenters;

    public Keyspace() {}
            
    public Keyspace(String name, List datacenters) {
        super();
        this.name = name;
        this.datacenters = datacenters;
    }
    
    public Keyspace(String name, int replicas) {
        super();
        this.name = name;
        this.replicas = replicas;
    }

    /**
     * Getter accessor for attribute 'name'.
     *
     * @return
     *       current value of 'name'
     */
    public String getName() {
        return name;
    }

    /**
     * Setter accessor for attribute 'name'.
     * @param name
     * 		new value for 'name '
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Getter accessor for attribute 'datacenters'.
     *
     * @return
     *       current value of 'datacenters'
     */
    public List getDatacenters() {
        return datacenters;
    }

    /**
     * Setter accessor for attribute 'datacenters'.
     * @param datacenters
     * 		new value for 'datacenters '
     */
    public void setDatacenters(List datacenters) {
        this.datacenters = datacenters;
    }

    /**
     * Getter accessor for attribute 'replicas'.
     *
     * @return
     *       current value of 'replicas'
     */
    public Integer getReplicas() {
        return replicas;
    }

    /**
     * Setter accessor for attribute 'replicas'.
     * @param replicas
     * 		new value for 'replicas '
     */
    public void setReplicas(Integer replicas) {
        this.replicas = replicas;
    }
    

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy