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

brooklyn.entity.nosql.cassandra.CassandraCluster Maven / Gradle / Ivy

There is a newer version: 0.7.0-M1
Show newest version
/*
 * Copyright 2012-2013 by Cloudsoft Corp.
 */
package brooklyn.entity.nosql.cassandra;

import brooklyn.catalog.Catalog;
import brooklyn.config.ConfigKey;
import brooklyn.entity.basic.Description;
import brooklyn.entity.basic.MethodEffector;
import brooklyn.entity.group.DynamicCluster;
import brooklyn.entity.proxying.ImplementedBy;
import brooklyn.event.AttributeSensor;
import brooklyn.event.basic.BasicAttributeSensor;
import brooklyn.event.basic.BasicAttributeSensorAndConfigKey;
import brooklyn.event.basic.BasicConfigKey;
import brooklyn.util.flags.SetFromFlag;

/**
 * A cluster of {@link CassandraNode}s based on {@link DynamicCluster} which can be resized by a policy if required.
 *
 * TODO add sensors with aggregated Cassandra statistics from cluster
 */
@Catalog(name="Apache Cassandra Database Cluster", description="Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store which provides a ColumnFamily-based data model richer than typical key/value systems", iconUrl="classpath:///cassandra-logo.jpeg")
@ImplementedBy(CassandraClusterImpl.class)
public interface CassandraCluster extends DynamicCluster {

    @SetFromFlag("clusterName")
    BasicAttributeSensorAndConfigKey CLUSTER_NAME = new BasicAttributeSensorAndConfigKey(String.class, "cassandra.cluster.name", "Name of the Cassandra cluster", "BrooklynCluster");

    ConfigKey SEEDS = new BasicConfigKey(String.class, "cassandra.cluster.seeds", "List of seed node hosts in cluster");

    AttributeSensor HOSTNAME = new BasicAttributeSensor(String.class, "cassandra.cluster.hostname", "Hostname to connect to cluster with");

    AttributeSensor THRIFT_PORT = new BasicAttributeSensor(Integer.class, "cassandra.cluster.thrift.port", "Cassandra Thrift RPC port to connect to cluster with");

    MethodEffector UPDATE = new MethodEffector(CassandraCluster.class, "update");

    /**
     * The name of the cluster.
     */
    String getClusterName();

    @Description("Updates the cluster members")
    void update();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy